summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index d4b61126bd..4ec76d063a 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -606,8 +606,10 @@ static int aac_encode_frame(AVCodecContext *avctx,
}
frame_bits = put_bits_count(&s->pb);
- if (frame_bits <= 6144 * avctx->channels - 3)
+ if (frame_bits <= 6144 * avctx->channels - 3) {
+ s->psy.bitres.bits = frame_bits / avctx->channels;
break;
+ }
s->lambda *= avctx->bit_rate * 1024.0f / avctx->sample_rate / frame_bits;