[FFmpeg-cvslog] avcodec/pngdec: apng: fix output buffer filling when no blending is needed.
Benoit Fouet
git at videolan.org
Fri Nov 28 18:32:05 CET 2014
ffmpeg | branch: master | Benoit Fouet <benoit.fouet at free.fr> | Fri Nov 28 16:54:09 2014 +0100| [ebf2052a6177ccdb16c1b50ffb49b4bf8bd11358] | committer: Michael Niedermayer
avcodec/pngdec: apng: fix output buffer filling when no blending is needed.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebf2052a6177ccdb16c1b50ffb49b4bf8bd11358
---
libavcodec/pngdec.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a330d36..9e52d0b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -927,7 +927,17 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s,
pd += s->image_linesize;
pd_last += s->image_linesize;
}
+ } else {
+ for (j = s->y_offset; j < s->y_offset + s->cur_h; j++) {
+ for (i = 0; i < s->x_offset * s->bpp; i++)
+ pd[i] = pd_last[i];
+ for (i = (s->x_offset + s->cur_w) * s->bpp; i < ls; i++)
+ pd[i] = pd_last[i];
+ pd += s->image_linesize;
+ pd_last += s->image_linesize;
+ }
}
+
for (j = s->y_offset + s->cur_h; j < s->height; j++) {
for (i = 0; i < ls; i++)
pd[i] = pd_last[i];
More information about the ffmpeg-cvslog
mailing list