diff options
author | Alex Converse <alex.converse@gmail.com> | 2009-07-16 22:20:17 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2009-07-16 22:20:17 +0000 |
commit | a5762c9b595b5d5b8f09ffaf2e29ad3ffee2a395 (patch) | |
tree | d913648e2110b95ac04f284652bb83d02a7f5c32 /libavcodec | |
parent | ca0f1e50928bda4a150d3bafe133e3d593f4aa65 (diff) | |
download | ffmpeg-a5762c9b595b5d5b8f09ffaf2e29ad3ffee2a395.tar.gz |
When calculating AAC quantized band cost, don't leave garbage in the bit count
for the 0 codebook.
Originally committed as revision 19444 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aaccoder.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index f4ae130b7e..252b3592a3 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -124,6 +124,8 @@ static float quantize_band_cost(struct AACEncContext *s, const float *in, if (!cb) { for (i = 0; i < size; i++) cost += in[i]*in[i]*lambda; + if (bits) + *bits = 0; return cost; } #ifndef USE_REALLY_FULL_SEARCH |