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
15ff3f3f
Commit
15ff3f3f
authored
Aug 21, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: check avpicture_fill() return value
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
4e8963fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ffmpeg.c
ffmpeg.c
+5
-1
No files found.
ffmpeg.c
View file @
15ff3f3f
...
...
@@ -1882,7 +1882,11 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
if
(
ost
->
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
&&
(
of
->
ctx
->
oformat
->
flags
&
AVFMT_RAWPICTURE
))
{
/* store AVPicture in AVPacket, as expected by the output format */
avpicture_fill
(
&
pict
,
opkt
.
data
,
ost
->
st
->
codec
->
pix_fmt
,
ost
->
st
->
codec
->
width
,
ost
->
st
->
codec
->
height
);
int
ret
=
avpicture_fill
(
&
pict
,
opkt
.
data
,
ost
->
st
->
codec
->
pix_fmt
,
ost
->
st
->
codec
->
width
,
ost
->
st
->
codec
->
height
);
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"avpicture_fill failed
\n
"
);
exit_program
(
1
);
}
opkt
.
data
=
(
uint8_t
*
)
&
pict
;
opkt
.
size
=
sizeof
(
AVPicture
);
opkt
.
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