From c226fc5bfb37659c7c2ed75fd5fa9988bf175579 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sat, 24 Jul 2010 04:23:26 +0000 Subject: [PATCH] aacenc: Prevent premature termination of the two loop search. Originally committed as revision 24476 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/aaccoder.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index b0945edffc..9d768d4ee4 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -795,10 +795,8 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx, 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;