aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-07-04 21:23:53 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-07-05 02:11:17 +0200
commit810294ce3d3d9cceb3670a938379e2b2cba6cdc9 (patch)
tree104606fcf4836d0ec2e70378932f1eadc54b3a54 /libavcodec/bmp.c
parent8f6a04a279bb72b9aa73d30b9e43a54fd9b1aedb (diff)
downloadffmpeg-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.c2
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