[FFmpeg-cvslog] bmp: fix decoding of flipped rle4

Piotr Bandurski git at videolan.org
Fri Jul 19 17:54:49 CEST 2013


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Thu Jul 18 09:36:05 2013 +0200| [5f39992ed925230645f95b6a78d471253d7146c1] | committer: Michael Niedermayer

bmp: fix decoding of flipped rle4

Fixes ticket #2794

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f39992ed925230645f95b6a78d471253d7146c1
---

 libavcodec/bmp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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];
         }



More information about the ffmpeg-cvslog mailing list