[FFmpeg-cvslog] r24627 - trunk/libavcodec/flacenc.c

jbr subversion
Sat Jul 31 20:48:48 CEST 2010


Author: jbr
Date: Sat Jul 31 20:48:48 2010
New Revision: 24627

Log:
10l: fix bit count for frame header

Modified:
   trunk/libavcodec/flacenc.c

Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c	Sat Jul 31 19:23:29 2010	(r24626)
+++ trunk/libavcodec/flacenc.c	Sat Jul 31 20:48:48 2010	(r24627)
@@ -945,7 +945,10 @@ static int count_frame_header(FlacEncode
     PUT_UTF8(s->frame_count, tmp, count += 8;)
 
     /* explicit block size */
-    count += FFMAX(0, s->frame.bs_code[0] - 5) * 8;
+    if (s->frame.bs_code[0] == 6)
+        count += 8;
+    else if (s->frame.bs_code[0] == 7)
+        count += 16;
 
     /* explicit sample rate */
     count += ((s->sr_code[0] == 12) + (s->sr_code[0] > 12)) * 8;



More information about the ffmpeg-cvslog mailing list