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
This commit is contained in:
parent
78ad664a7e
commit
1ac7d1ac50
@ -872,8 +872,8 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
|
|||||||
/* TODO: modify coupling end freq if spectral extension is used */
|
/* TODO: modify coupling end freq if spectral extension is used */
|
||||||
cpl_start_subband = get_bits(gbc, 4);
|
cpl_start_subband = get_bits(gbc, 4);
|
||||||
cpl_end_subband = get_bits(gbc, 4) + 3;
|
cpl_end_subband = get_bits(gbc, 4) + 3;
|
||||||
if (cpl_start_subband > cpl_end_subband) {
|
if (cpl_start_subband >= cpl_end_subband) {
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d > %d)\n",
|
av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d >= %d)\n",
|
||||||
cpl_start_subband, cpl_end_subband);
|
cpl_start_subband, cpl_end_subband);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user