summaryrefslogtreecommitdiffstats
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-11 17:56:04 +0000
committerPaul B Mahol <onemda@gmail.com>2012-10-11 18:05:06 +0000
commit313b40efbd63a2c6b9933519ba2b208f1031a9d0 (patch)
tree918fe9f92285e71307a3caa5d17445d4d2b26d1a /libavcodec/bmp.c
parent9ad1ea13e08f696b2baf08f34bd3aa1af2717917 (diff)
downloadffmpeg-streaming-313b40efbd63a2c6b9933519ba2b208f1031a9d0.zip
ffmpeg-streaming-313b40efbd63a2c6b9933519ba2b208f1031a9d0.tar.gz
bmp: unbreak non BMP_RGB compression for v4 and v5
Fixes CID733728 & CID733729. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index d0f5b74..e8e0072 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -118,7 +118,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
depth = bytestream_get_le16(&buf);
- if(ihsize == 40 || ihsize == 64 || ihsize == 56)
+ if (ihsize >= 40)
comp = bytestream_get_le32(&buf);
else
comp = BMP_RGB;
@@ -133,8 +133,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
rgb[0] = bytestream_get_le32(&buf);
rgb[1] = bytestream_get_le32(&buf);
rgb[2] = bytestream_get_le32(&buf);
- if (ihsize >= 108)
- alpha = bytestream_get_le32(&buf);
+ alpha = bytestream_get_le32(&buf);
}
avctx->width = width;
OpenPOWER on IntegriCloud