[FFmpeg-cvslog] r10916 - trunk/libavcodec/flac.c

jbr subversion
Sun Nov 4 01:06:33 CET 2007


Author: jbr
Date: Sun Nov  4 01:06:33 2007
New Revision: 10916

Log:
Add decoding support for variable block size FLAC files using the latest FLAC
specification. Patch by Josh Coalson.

Modified:
   trunk/libavcodec/flac.c

Modified: trunk/libavcodec/flac.c
==============================================================================
--- trunk/libavcodec/flac.c	(original)
+++ trunk/libavcodec/flac.c	Sun Nov  4 01:06:33 2007
@@ -628,9 +628,9 @@ static int flac_decode_frame(AVCodecCont
     if (!metadata_parse(s))
     {
         tmp = show_bits(&s->gb, 16);
-        if(tmp != 0xFFF8){
+        if((tmp & 0xFFFE) != 0xFFF8){
             av_log(s->avctx, AV_LOG_ERROR, "FRAME HEADER not here\n");
-            while(get_bits_count(&s->gb)/8+2 < buf_size && show_bits(&s->gb, 16) != 0xFFF8)
+            while(get_bits_count(&s->gb)/8+2 < buf_size && (show_bits(&s->gb, 16) & 0xFFFE) != 0xFFF8)
                 skip_bits(&s->gb, 8);
             goto end; // we may not have enough bits left to decode a frame, so try next time
         }




More information about the ffmpeg-cvslog mailing list