aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-05-16 17:02:44 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-05-16 17:02:44 +0000
commit1ac7d1ac50291cf9b4f2de0c8224bbd2eb05ece5 (patch)
treec6ed050205b14800d662d4bee23422277a43c47a
parent78ad664a7e4960da0ecf501525a4121372df5662 (diff)
downloadffmpeg-1ac7d1ac50291cf9b4f2de0c8224bbd2eb05ece5.tar.gz
ac3dec: fix coupling range check. the start subband must be less than
the end subband. Originally committed as revision 18857 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 7d9d0142df..bc39fb35b9 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -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;
}