diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-11 17:56:04 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 21:09:27 +0200 |
commit | c9df500190ee9e2f4a7471e483069c06b24f5b00 (patch) | |
tree | 71c9ad3f63e97221c4125dcdf8a285efe54ef2e7 /libavcodec/bmp.c | |
parent | d12bf6fc9e7ea64f15e3b0a14e14ec49093ec81b (diff) | |
download | ffmpeg-c9df500190ee9e2f4a7471e483069c06b24f5b00.tar.gz |
bmp: unbreak non BMP_RGB compression for v4 and v5
Fixes CID733728 & CID733729.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 313b40efbd63a2c6b9933519ba2b208f1031a9d0)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r-- | libavcodec/bmp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index a286584428..14fd19379a 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -117,7 +117,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; @@ -132,8 +132,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; |