diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2010-12-31 22:59:19 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2010-12-31 22:59:19 +0000 |
commit | 5128842ea2057c86550b833c9141c271df1bdc94 (patch) | |
tree | 5d7886fed769c769d5f3dd8275427143d8ca191f /libavcodec/ac3enc.c | |
parent | c05ffcd9baea8cd8720c2798e23bbf65199f2696 (diff) | |
download | ffmpeg-5128842ea2057c86550b833c9141c271df1bdc94.tar.gz |
10l: Fix mistake in r26044. Check increment bounds using actual increment
instead of 64. This will change output in some cases, but it happens to not
affect the AC-3 regression tests.
Originally committed as revision 26180 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r-- | libavcodec/ac3enc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index f5ee9337b1..9b23f31b69 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1125,7 +1125,7 @@ static int cbr_bit_allocation(AC3EncodeContext *s) FFSWAP(uint8_t *, s->bap_buffer, s->bap1_buffer); for (snr_incr = 64; snr_incr > 0; snr_incr >>= 2) { - while (snr_offset + 64 <= 1023 && + while (snr_offset + snr_incr <= 1023 && bit_alloc(s, snr_offset + snr_incr) <= bits_left) { snr_offset += snr_incr; FFSWAP(uint8_t *, s->bap_buffer, s->bap1_buffer); |