From 89f11f498b9c15bc71494a11a7ec560f4adf630d Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 30 Jan 2013 06:42:17 +0100 Subject: qtrle: fix the topmost line for 1bit Signed-off-by: Anton Khirnov CC:libav-stable@libav.org --- libavcodec/qtrle.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavcodec') 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); -- cgit v1.2.3