Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f1ed83e2
Commit
f1ed83e2
authored
Oct 20, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
img2dec: check av_new_packet return value
CC: libav-stable@libav.org Bug-Id: CID 1087077
parent
1967cd4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
img2dec.c
libavformat/img2dec.c
+4
-2
No files found.
libavformat/img2dec.c
View file @
f1ed83e2
...
@@ -221,7 +221,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
...
@@ -221,7 +221,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
{
{
VideoDemuxData
*
s
=
s1
->
priv_data
;
VideoDemuxData
*
s
=
s1
->
priv_data
;
char
filename
[
1024
];
char
filename
[
1024
];
int
i
;
int
i
,
res
;
int
size
[
3
]
=
{
0
},
ret
[
3
]
=
{
0
};
int
size
[
3
]
=
{
0
},
ret
[
3
]
=
{
0
};
AVIOContext
*
f
[
3
]
=
{
NULL
};
AVIOContext
*
f
[
3
]
=
{
NULL
};
AVCodecContext
*
codec
=
s1
->
streams
[
0
]
->
codec
;
AVCodecContext
*
codec
=
s1
->
streams
[
0
]
->
codec
;
...
@@ -262,7 +262,9 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
...
@@ -262,7 +262,9 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
size
[
0
]
=
4096
;
size
[
0
]
=
4096
;
}
}
av_new_packet
(
pkt
,
size
[
0
]
+
size
[
1
]
+
size
[
2
]);
res
=
av_new_packet
(
pkt
,
size
[
0
]
+
size
[
1
]
+
size
[
2
]);
if
(
res
<
0
)
return
res
;
pkt
->
stream_index
=
0
;
pkt
->
stream_index
=
0
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment