I've upgraded to FLAC 1.1.3, and now I have some streams where seek does not work anymore, but they used to work before. After a bit of debugging, it looks like those streams (created a long time ago with an old version of FLAC) have a seek table where all the entries have a stream offset of 0. The result is that in the function seek_to_absolute_sample_, on line 3076 (file stream_decoder.c), the following test returns:

/* make sure we are not seeking in corrupted stream */
if (this_frame_sample < lower_bound_sample) {
    decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
    return false;
}

because 'this_frame_sample' is equal to 0 (because the seek table caused the seek search to start at the beginning of the stream)

Now, since seeking in that file worked perfectly fine with older libraries, I think it would be great if 1.1.3 and above would keep this feature of still being able to seek even if the seek table is bogus like this one (because people may have old streams like this one created by an old verion of FLAC that did not create a correct seek table).


-- Gilles

_______________________________________________
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to