From 3a7f8d2a1f305fac97742c6aa5528c644e08e966 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 27 Feb 2017 12:04:15 +0100 Subject: [PATCH] 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 --- libavcodec/qdrw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c index 975e44013f..20e673a515 100644 --- a/libavcodec/qdrw.c +++ b/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;