diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-07-04 21:23:53 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-07-05 02:11:17 +0200 |
commit | 810294ce3d3d9cceb3670a938379e2b2cba6cdc9 (patch) | |
tree | 104606fcf4836d0ec2e70378932f1eadc54b3a54 /libavcodec/bmp.c | |
parent | 8f6a04a279bb72b9aa73d30b9e43a54fd9b1aedb (diff) | |
download | ffmpeg-810294ce3d3d9cceb3670a938379e2b2cba6cdc9.tar.gz |
Use os/2 palette even if it contains less than 256 entries.
Fixes 11Bios13.bmp.
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r-- | libavcodec/bmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index ec4c467049..458fd0c768 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -248,6 +248,8 @@ static int bmp_decode_frame(AVCodecContext *avctx, } else if (t) { colors = t; } + } else { + colors = FFMIN(256, (hsize-ihsize-14) / 3); } buf = buf0 + 14 + ihsize; //palette location // OS/2 bitmap, 3 bytes per palette entry |