[FFmpeg-cvslog] r18091 - trunk/libavcodec/flacdec.c

jbr subversion
Sat Mar 21 02:27:28 CET 2009


Author: jbr
Date: Sat Mar 21 02:27:28 2009
New Revision: 18091

Log:
flacdec: account for frame and subframe header overhead when calculating 
estimate for maximum frame size

Modified:
   trunk/libavcodec/flacdec.c

Modified: trunk/libavcodec/flacdec.c
==============================================================================
--- trunk/libavcodec/flacdec.c	Sat Mar 21 02:20:28 2009	(r18090)
+++ trunk/libavcodec/flacdec.c	Sat Mar 21 02:27:28 2009	(r18091)
@@ -147,8 +147,7 @@ static void allocate_buffers(FLACContext
     assert(s->max_blocksize);
 
     if (s->max_framesize == 0 && s->max_blocksize) {
-        // FIXME header overhead
-        s->max_framesize= (s->channels * s->bps * s->max_blocksize + 7)/ 8;
+        s->max_framesize = 23 + (s->channels * s->bps * s->max_blocksize + 7) / 8;
     }
 
     for (i = 0; i < s->channels; i++) {




More information about the ffmpeg-cvslog mailing list