]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
ac3dec: fix coupling range check. the start subband must be less than
authorjbr <jbr@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 16 May 2009 17:02:44 +0000 (17:02 +0000)
committerjbr <jbr@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 16 May 2009 17:02:44 +0000 (17:02 +0000)
the end subband.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18857 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/ac3dec.c

index 7d9d0142df2ac04cfb43e823198941b1625fc521..bc39fb35b9a84977c237a2d19c40495a844fdaf7 100644 (file)
@@ -872,8 +872,8 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
             /* TODO: modify coupling end freq if spectral extension is used */
             cpl_start_subband = get_bits(gbc, 4);
             cpl_end_subband   = get_bits(gbc, 4) + 3;
-            if (cpl_start_subband > cpl_end_subband) {
-                av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d > %d)\n",
+            if (cpl_start_subband >= cpl_end_subband) {
+                av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d >= %d)\n",
                        cpl_start_subband, cpl_end_subband);
                 return -1;
             }