bmp: fix decoding of flipped rle4
authorPiotr Bandurski <ami_stuff@o2.pl>
Thu, 18 Jul 2013 07:36:05 +0000 (09:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 19 Jul 2013 15:42:34 +0000 (17:42 +0200)
Fixes ticket #2794

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/bmp.c

index 39d9f80..51459e5 100644 (file)
@@ -256,7 +256,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
         buf = buf0 + hsize;
     }
     if (comp == BMP_RLE4 || comp == BMP_RLE8) {
-        if (height < 0) {
+        if (comp == BMP_RLE8 && height < 0) {
             p->data[0]    +=  p->linesize[0] * (avctx->height - 1);
             p->linesize[0] = -p->linesize[0];
         }