fixed very rare seek bug (SF#1684049: https://sourceforge.net/tracker/index.php?func...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 29 Aug 2007 00:45:01 +0000 (00:45 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 29 Aug 2007 00:45:01 +0000 (00:45 +0000)
doc/html/changelog.html
src/libFLAC/stream_decoder.c

index 15867d1..dd37e74 100644 (file)
                        <li>
                                libraries:
                                <ul>
-                                       <li>(none)</li>
+                                       <li>libFLAC: Fixed very rare seek bug (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1684049&amp;group_id=13478&amp;atid=113478">SF #1684049</a>).</li>
                                </ul>
                        </li>
                        <li>
index 1d7b159..86eaacf 100644 (file)
@@ -2043,6 +2043,8 @@ FLAC__bool read_frame_(FLAC__StreamDecoder *decoder, FLAC__bool *got_a_frame, FL
        }
        if(!read_zero_padding_(decoder))
                return false;
+       if(decoder->protected_->state == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC) /* means bad sync or got corruption (i.e. "zero bits" were not all zeroes) */
+               return true;
 
        /*
         * Read the frame CRC-16 from the footer and check