Skip to content

Commit

Permalink
avcodec/pngdec: apng: fix output buffer filling when no blending is n…
Browse files Browse the repository at this point in the history
…eeded.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
Benoit Fouet authored and michaelni committed Nov 28, 2014
1 parent 885a763 commit ebf2052
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libavcodec/pngdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit ebf2052

Please sign in to comment.