diff options
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qtrle.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 32ad5d66b7..5100e318fb 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -56,13 +56,16 @@ typedef struct QtrleContext { static void qtrle_decode_1bpp(QtrleContext *s, int row_ptr, int lines_to_change) { int rle_code; - int pixel_ptr = 0; + int pixel_ptr; int row_inc = s->frame.linesize[0]; unsigned char pi0, pi1; /* 2 8-pixel values */ unsigned char *rgb = s->frame.data[0]; int pixel_limit = s->frame.linesize[0] * s->avctx->height; int skip; + row_ptr -= row_inc; + pixel_ptr = row_ptr; + lines_to_change++; while (lines_to_change) { skip = bytestream2_get_byte(&s->g); rle_code = (signed char)bytestream2_get_byte(&s->g); |