From d54eb03dd651469b76e5a7cd0dc7c9af9bc37a1d Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 29 Aug 2007 00:45:01 +0000 Subject: [PATCH] fixed very rare seek bug (SF#1684049: https://sourceforge.net/tracker/index.php?func=detail&aid=1684049&group_id=13478&atid=113478) --- doc/html/changelog.html | 2 +- src/libFLAC/stream_decoder.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/html/changelog.html b/doc/html/changelog.html index 15867d1f..dd37e74f 100644 --- a/doc/html/changelog.html +++ b/doc/html/changelog.html @@ -110,7 +110,7 @@
  • libraries:
  • diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 1d7b1599..86eaacfa 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -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