提交 4142487d 编写于 作者: J Justin Ruggles

ac3enc: return error if frame+exponent bits are too large instead of using

av_assert2().

This can occur in some very rare cases with low bitrates.
上级 987fe2dc
......@@ -1052,7 +1052,8 @@ static int cbr_bit_allocation(AC3EncodeContext *s)
int snr_offset, snr_incr;
bits_left = 8 * s->frame_size - (s->frame_bits + s->exponent_bits);
av_assert2(bits_left >= 0);
if (bits_left < 0)
return AVERROR(EINVAL);
snr_offset = s->coarse_snr_offset << 4;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册