avcodec/qdrw: consume bytes when end is reached for 8bpp case

This should really be part of previous commit.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/233/merge
Paul B Mahol 8 years ago
parent 1dcf91f2d3
commit 3a7f8d2a1f
  1. 3
      libavcodec/qdrw.c

@ -242,8 +242,9 @@ static int decode_rle(AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc,
left -= 2;
} else { /* copy */
for (j = 0; j < code + 1; j++) {
pix = bytestream2_get_byte(gbc);
if (pos < offset)
out[pos] = bytestream2_get_byte(gbc);
out[pos] = pix;
pos += step;
if (pos >= offset && step > 1) {
pos -= offset;

Loading…
Cancel
Save