]> git.sesse.net Git - ffmpeg/commitdiff
Fix decoding of msrle samples with 1bpp.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 15 May 2011 00:38:02 +0000 (02:38 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 15 May 2011 01:25:57 +0000 (03:25 +0200)
libavcodec/msrle.c

index a5c80ff1c02493883f73c6ba890284d9d1c483ff..496eb40916777e5e5f9ab6c6c2156f2c89f3be49 100644 (file)
@@ -93,7 +93,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
         return -1;
     }
 
-    if (avctx->bits_per_coded_sample <= 8) {
+    if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) {
         const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
 
         if (pal) {