[FFmpeg-cvslog] r23036 - trunk/libavcodec/aacenc.c

alexc subversion
Thu May 6 22:35:10 CEST 2010


Author: alexc
Date: Thu May  6 22:35:10 2010
New Revision: 23036

Log:
Error out when too many bits per frame are requested.

Modified:
   trunk/libavcodec/aacenc.c

Modified: trunk/libavcodec/aacenc.c
==============================================================================
--- trunk/libavcodec/aacenc.c	Thu May  6 22:18:36 2010	(r23035)
+++ trunk/libavcodec/aacenc.c	Thu May  6 22:35:10 2010	(r23036)
@@ -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