Commit 9b528089 authored by jbr's avatar jbr

add check for invalid channel mode when coupling is used

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13381 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2dd92062
...@@ -818,6 +818,11 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk) ...@@ -818,6 +818,11 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
/* coupling in use */ /* coupling in use */
int cpl_begin_freq, cpl_end_freq; int cpl_begin_freq, cpl_end_freq;
if (channel_mode < AC3_CHMODE_STEREO) {
av_log(s->avctx, AV_LOG_ERROR, "coupling not allowed in mono or dual-mono\n");
return -1;
}
/* determine which channels are coupled */ /* determine which channels are coupled */
for (ch = 1; ch <= fbw_channels; ch++) for (ch = 1; ch <= fbw_channels; ch++)
s->channel_in_cpl[ch] = get_bits1(gbc); s->channel_in_cpl[ch] = get_bits1(gbc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment