From 0368e2d7504829c2cc900e6f5b82da51e8af4b6d Mon Sep 17 00:00:00 2001 From: Piotr Bandurski Date: Thu, 18 Jul 2013 09:36:05 +0200 Subject: [PATCH] bmp: fix decoding of flipped rle4 --- libavcodec/bmp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 39d9f80..51459e5 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -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]; } -- 1.7.9