[FFmpeg-cvslog] avcodec/pngenc: restore image size before copying frame

Dmitriy git at videolan.org
Fri Apr 8 12:46:42 CEST 2016


ffmpeg | branch: master | Dmitriy <DiZNet at mail.ru> | Fri Apr  8 12:37:20 2016 +0200| [c3320a51df2bed022369057d4411695aad0974dc] | committer: Paul B Mahol

avcodec/pngenc: restore image size before copying frame

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3320a51df2bed022369057d4411695aad0974dc
---

 libavcodec/pngenc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index e9e8bc2..2ee43c5 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);
             }
 



More information about the ffmpeg-cvslog mailing list