changeset 12261:940736055764 libavcodec

aacenc: Prevent premature termination of the two loop search.
author alexc
date Sat, 24 Jul 2010 04:23:26 +0000
parents 65619c2230e7
children dde20597f15e
files aaccoder.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/aaccoder.c	Sat Jul 24 02:57:08 2010 +0000
+++ b/aaccoder.c	Sat Jul 24 04:23:26 2010 +0000
@@ -795,10 +795,8 @@
                         sce->sf_idx[i] -= qstep;
             }
             qstep >>= 1;
-            if (!qstep && tbits > destbits*1.02)
+            if (!qstep && tbits > destbits*1.02 && sce->sf_idx[0] < 217)
                 qstep = 1;
-            if (sce->sf_idx[0] >= 217)
-                break;
         } while (qstep);
 
         fflag = 0;