From 902e8d6b4453184c59518a658c74b01bd52cd058 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Tue, 11 Sep 2007 07:34:45 +0000 Subject: [PATCH] fix seek bug with ogg flac and small streams (SF#1792172: http://sourceforge.net/tracker/index.php?func=detail&aid=1792172&group_id=13478&atid=113478) --- doc/html/changelog.html | 1 + src/libFLAC/stream_decoder.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/html/changelog.html b/doc/html/changelog.html index bcb990ba..f4a5d4c6 100644 --- a/doc/html/changelog.html +++ b/doc/html/changelog.html @@ -117,6 +117,7 @@ libraries: diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index e368513a..981ef164 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -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;