changeset 9215:d6b9123556fb libavcodec

flacdec: account for frame and subframe header overhead when calculating estimate for maximum frame size
author jbr
date Sat, 21 Mar 2009 01:27:28 +0000
parents 78b55e071bb9
children 64246d9e583a
files flacdec.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flacdec.c	Sat Mar 21 01:20:28 2009 +0000
+++ b/flacdec.c	Sat Mar 21 01:27:28 2009 +0000
@@ -147,8 +147,7 @@
     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++) {