1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-01 22:16:42 +02:00

avcodec/pngdec: apng: fix output buffer filling when no blending is needed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Benoit Fouet 2014-11-28 16:54:09 +01:00 committed by Michael Niedermayer
parent 885a763cac
commit ebf2052a61

View File

@ -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];