summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-07-08 23:04:22 +0000
committerAlex Converse <alex.converse@gmail.com>2009-07-08 23:04:22 +0000
commit7a4eebcdce1e7b2ef8d9546ad46742f42531431e (patch)
treed07a0991b2ec1f2599ada729c4734e013292b1f3 /libavcodec/aacenc.c
parentc8f47d8b79b7ac82cd2bff6ffcc9d5168ad7e571 (diff)
Turn on AAC rate control.
Originally committed as revision 19379 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 0c921a55d2..61e0f52cc4 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -583,6 +583,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
if (!(avctx->flags & CODEC_FLAG_QSCALE)) {
float ratio = avctx->bit_rate * 1024.0f / avctx->sample_rate / avctx->frame_bits;
s->lambda *= ratio;
+ s->lambda = fminf(s->lambda, 65536.f);
}
if (avctx->frame_bits > 6144*avctx->channels)