[flac-dev] C API: How to get a seektable for very long files?

Martijn van Beurden mvanb1 at gmail.com
Tue Oct 15 17:03:35 UTC 2024


Op di 15 okt. 2024 16:18 schreef Stefan Oltmanns <stefan-oltmanns at gmx.net>:

>
> I see, but that would require changes in the software using libflac and
> require the file to be easily seekable to be able to skip to the end and
> depending on how far away the seek points are, it could take a while.
>

No, seeking to a specific sample can take a while because of all the
back-and-forth, but seeking to almost the end of the file is very quick.

I know this is not the cleanest way, but as this only for the rare cases
> with more than 2^36 samples, this should not affect a lot of people.
>

There are already a lot of applications reading FLAC, with and without
libFLAC. Changing behavior and the spec like this is going to break some of
them, because the changes you propose also affect files with fewer samples.
total samples being 0 can and does happen for files that were created by a
streaming encoder for example.

So, adding an API function that applications need to adopt is a feature,
not a bug. I really don't want to modify existing behavior when it is not
strictly necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20241015/01a97b66/attachment.htm>


More information about the flac-dev mailing list