[FFmpeg-soc] [soc]: r2915 - aac/aac.c

superdump subversion at mplayerhq.hu
Wed Jul 30 13:55:19 CEST 2008


Author: superdump
Date: Wed Jul 30 13:55:18 2008
New Revision: 2915

Log:
Add appropriate error message for output buffer size versus desired size check


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Wed Jul 30 13:55:18 2008
@@ -2189,8 +2189,12 @@ static int output_samples(AVCodecContext
     }
 
     i = 1024 * avccontext->channels * sizeof(int16_t);
-    if(*data_size < i)
+    if(*data_size < i) {
+        av_log(avccontext, AV_LOG_ERROR,
+               "Output buffer too small (%d) or trying to output too many samples (%d) for this frame.\n",
+               *data_size, i);
         return -1;
+    }
     *data_size = i;
 
     if(ac->mm[MIXDOWN_CENTER]) {



More information about the FFmpeg-soc mailing list