changeset 9957:6fb2be900484 libavcodec

When calculating AAC quantized band cost, don't leave garbage in the bit count for the 0 codebook.
author alexc
date Thu, 16 Jul 2009 22:20:17 +0000
parents 0448219eb490
children 8bca7dfd3334
files aaccoder.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aaccoder.c	Thu Jul 16 22:17:20 2009 +0000
+++ b/aaccoder.c	Thu Jul 16 22:20:17 2009 +0000
@@ -124,6 +124,8 @@
     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