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
1490682b
Commit
1490682b
authored
Apr 08, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/pngenc: check return value of av_frame_copy()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
c3320a51
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
pngenc.c
libavcodec/pngenc.c
+6
-2
No files found.
libavcodec/pngenc.c
View file @
1490682b
...
@@ -768,7 +768,9 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
...
@@ -768,7 +768,9 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
if
(
last_fctl_chunk
.
dispose_op
!=
APNG_DISPOSE_OP_PREVIOUS
)
{
if
(
last_fctl_chunk
.
dispose_op
!=
APNG_DISPOSE_OP_PREVIOUS
)
{
diffFrame
->
width
=
pict
->
width
;
diffFrame
->
width
=
pict
->
width
;
diffFrame
->
height
=
pict
->
height
;
diffFrame
->
height
=
pict
->
height
;
av_frame_copy
(
diffFrame
,
s
->
last_frame
);
ret
=
av_frame_copy
(
diffFrame
,
s
->
last_frame
);
if
(
ret
<
0
)
goto
fail
;
if
(
last_fctl_chunk
.
dispose_op
==
APNG_DISPOSE_OP_BACKGROUND
)
{
if
(
last_fctl_chunk
.
dispose_op
==
APNG_DISPOSE_OP_BACKGROUND
)
{
for
(
y
=
last_fctl_chunk
.
y_offset
;
y
<
last_fctl_chunk
.
y_offset
+
last_fctl_chunk
.
height
;
++
y
)
{
for
(
y
=
last_fctl_chunk
.
y_offset
;
y
<
last_fctl_chunk
.
y_offset
+
last_fctl_chunk
.
height
;
++
y
)
{
...
@@ -782,7 +784,9 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
...
@@ -782,7 +784,9 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
diffFrame
->
width
=
pict
->
width
;
diffFrame
->
width
=
pict
->
width
;
diffFrame
->
height
=
pict
->
height
;
diffFrame
->
height
=
pict
->
height
;
av_frame_copy
(
diffFrame
,
s
->
prev_frame
);
ret
=
av_frame_copy
(
diffFrame
,
s
->
prev_frame
);
if
(
ret
<
0
)
goto
fail
;
}
}
// Do inverse blending
// Do inverse blending
...
...
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