OSDN Git Service

mpc8: make maxband check less picky.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Apr 2012 08:40:00 +0000 (10:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Apr 2012 09:09:12 +0000 (11:09 +0200)
Fixes Ticket1245

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpc8.c

index 3e32a65..2808b58 100644 (file)
@@ -272,7 +272,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
         maxband = c->last_max_band + get_vlc2(gb, band_vlc.table, MPC8_BANDS_BITS, 2);
         if(maxband > 32) maxband -= 33;
     }
-    if(maxband > c->maxbands)
+    if(maxband >= BANDS)
         return AVERROR_INVALIDDATA;
     c->last_max_band = maxband;