mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 21:20:41 +00:00
add check for invalid channel mode when coupling is used
Originally committed as revision 13381 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e188cb70d8
commit
3af9131398
@ -818,6 +818,11 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
|
||||
/* coupling in use */
|
||||
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 */
|
||||
for (ch = 1; ch <= fbw_channels; ch++)
|
||||
s->channel_in_cpl[ch] = get_bits1(gbc);
|
||||
|
Loading…
Reference in New Issue
Block a user