Module: libav Branch: master Commit: 4142487d1cd8c555e13f156d1cc89f838099db10
Author: Justin Ruggles <[email protected]> Committer: Justin Ruggles <[email protected]> Date: Fri Apr 15 19:56:42 2011 -0400 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. --- libavcodec/ac3enc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 00cb047..47fd9b6 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -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; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
