From 7a4eebcdce1e7b2ef8d9546ad46742f42531431e Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Wed, 8 Jul 2009 23:04:22 +0000 Subject: Turn on AAC rate control. Originally committed as revision 19379 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/aacenc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/aacenc.c') 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) -- cgit v1.2.3