aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-07-24 04:23:26 +0000
committerAlex Converse <alex.converse@gmail.com>2010-07-24 04:23:26 +0000
commitc226fc5bfb37659c7c2ed75fd5fa9988bf175579 (patch)
treec7500714bd2a59fa04cdd2111442bb4eee71f0fb /libavcodec/aaccoder.c
parent81824fe05950675787fecc6e164e850f5ed88f77 (diff)
downloadffmpeg-c226fc5bfb37659c7c2ed75fd5fa9988bf175579.tar.gz
aacenc: Prevent premature termination of the two loop search.
Originally committed as revision 24476 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r--libavcodec/aaccoder.c4
1 files changed, 1 insertions, 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;