fix seek bug with ogg flac and small streams (SF#1792172: http://sourceforge.net...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 11 Sep 2007 07:34:45 +0000 (07:34 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Tue, 11 Sep 2007 07:34:45 +0000 (07:34 +0000)
doc/html/changelog.html
src/libFLAC/stream_decoder.c

index bcb990b..f4a5d4c 100644 (file)
                                libraries:
                                <ul>
                                        <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>
+                                       <li>libFLAC: Fixed seek bug with Ogg FLAC and small streams (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1792172&amp;group_id=13478&amp;atid=113478">SF #1792172</a>).</li>
                                        <li>libFLAC: 64-bit fixes (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1790872&amp;group_id=13478&amp;atid=113478">SF #1790872</a>).</li>
                                </ul>
                        </li>
index e368513..981ef16 100644 (file)
@@ -3188,7 +3188,7 @@ FLAC__bool seek_to_absolute_sample_ogg_(FLAC__StreamDecoder *decoder, FLAC__uint
 {
        FLAC__uint64 left_pos = 0, right_pos = stream_length;
        FLAC__uint64 left_sample = 0, right_sample = FLAC__stream_decoder_get_total_samples(decoder);
-       FLAC__uint64 this_frame_sample = 0; /* only initialized to avoid compiler warning */
+       FLAC__uint64 this_frame_sample = (FLAC__uint64)0 - 1;
        FLAC__uint64 pos = 0; /* only initialized to avoid compiler warning */
        FLAC__bool did_a_seek;
        unsigned iteration = 0;