summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorDmitriy <DiZNet@mail.ru>2016-04-08 12:37:20 +0200
committerPaul B Mahol <onemda@gmail.com>2016-04-08 12:37:20 +0200
commitc3320a51df2bed022369057d4411695aad0974dc (patch)
tree612b2a3900d3945de27f815c7e18c071c5609c5e /libavcodec
parentae8a13c560226f96544a07eb736014b3b5abb1d6 (diff)
avcodec/pngenc: restore image size before copying frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pngenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index e9e8bc2782..2ee43c52a3 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -766,6 +766,8 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
// Do disposal
if (last_fctl_chunk.dispose_op != APNG_DISPOSE_OP_PREVIOUS) {
+ diffFrame->width = pict->width;
+ diffFrame->height = pict->height;
av_frame_copy(diffFrame, s->last_frame);
if (last_fctl_chunk.dispose_op == APNG_DISPOSE_OP_BACKGROUND) {
@@ -778,6 +780,8 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict,
if (!s->prev_frame)
continue;
+ diffFrame->width = pict->width;
+ diffFrame->height = pict->height;
av_frame_copy(diffFrame, s->prev_frame);
}