aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Fouet <benoit.fouet@free.fr>2014-11-28 16:54:09 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-28 17:55:18 +0100
commitebf2052a6177ccdb16c1b50ffb49b4bf8bd11358 (patch)
treede86ed7f9d609d6f5796ed1168b54de4d6861841
parent885a763cacf57d12e08659137942fb327c643272 (diff)
downloadffmpeg-ebf2052a6177ccdb16c1b50ffb49b4bf8bd11358.tar.gz
avcodec/pngdec: apng: fix output buffer filling when no blending is needed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/pngdec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a330d36c2d..9e52d0bee0 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];