Commit 5f39992e authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

bmp: fix decoding of flipped rle4

Fixes ticket #2794
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a4b55bbb
...@@ -256,7 +256,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, ...@@ -256,7 +256,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
buf = buf0 + hsize; buf = buf0 + hsize;
} }
if (comp == BMP_RLE4 || comp == BMP_RLE8) { 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->data[0] += p->linesize[0] * (avctx->height - 1);
p->linesize[0] = -p->linesize[0]; p->linesize[0] = -p->linesize[0];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment