[FFmpeg-cvslog] r23183 - in branches/0.6: . libavcodec/aacenc.c
siretart
subversion
Wed May 19 13:38:31 CEST 2010
Author: siretart
Date: Wed May 19 13:38:30 2010
New Revision: 23183
Log:
Error out when too many bits per frame are requested.
backport r23036 by alexc
Modified:
branches/0.6/ (props changed)
branches/0.6/libavcodec/aacenc.c
Modified: branches/0.6/libavcodec/aacenc.c
==============================================================================
--- branches/0.6/libavcodec/aacenc.c Wed May 19 13:38:07 2010 (r23182)
+++ branches/0.6/libavcodec/aacenc.c Wed May 19 13:38:30 2010 (r23183)
@@ -174,6 +174,10 @@ static av_cold int aac_encode_init(AVCod
av_log(avctx, AV_LOG_ERROR, "Unsupported profile %d\n", avctx->profile);
return -1;
}
+ if (1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * avctx->channels) {
+ av_log(avctx, AV_LOG_ERROR, "Too many bits per frame requested\n");
+ return -1;
+ }
s->samplerate_index = i;
dsputil_init(&s->dsp, avctx);
More information about the ffmpeg-cvslog
mailing list