Commit ebf2052a authored by Benoit Fouet's avatar Benoit Fouet Committed by Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 885a763c
...@@ -927,7 +927,17 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, ...@@ -927,7 +927,17 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s,
pd += s->image_linesize; pd += s->image_linesize;
pd_last += 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 (j = s->y_offset + s->cur_h; j < s->height; j++) {
for (i = 0; i < ls; i++) for (i = 0; i < ls; i++)
pd[i] = pd_last[i]; pd[i] = pd_last[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment