Use os/2 palette even if it contains less than 256 entries.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 4 Jul 2014 19:23:53 +0000 (21:23 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 5 Jul 2014 00:11:17 +0000 (02:11 +0200)
Fixes 11Bios13.bmp.

libavcodec/bmp.c

index ec4c467..458fd0c 100644 (file)
@@ -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