1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

bmp: fix decoding of flipped rle4

Fixes ticket #2794

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Piotr Bandurski 2013-07-18 09:36:05 +02:00 committed by Michael Niedermayer
parent a4b55bbb6f
commit 5f39992ed9

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