changeset 5872:cd4b72a32517 libavcodec

Add decoding support for variable block size FLAC files using the latest FLAC specification. Patch by Josh Coalson.
author jbr
date Sun, 04 Nov 2007 00:06:33 +0000
parents 83554c0e9ce6
children bf9ef8761700
files flac.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flac.c	Sat Nov 03 23:54:50 2007 +0000
+++ b/flac.c	Sun Nov 04 00:06:33 2007 +0000
@@ -628,9 +628,9 @@
     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
         }