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>
This commit is contained in:
Paul B Mahol 2017-02-27 12:04:15 +01:00
parent 1dcf91f2d3
commit 3a7f8d2a1f
1 changed files with 2 additions and 1 deletions

View File

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