--skip and --until with total sample count of 0

Stefan Oltmanns <[email protected]> Tue, 17 Jun 2025 00:11:25 +0200
Newsgroups gmane.comp.audio.compression.flac.devel
Message-ID <[email protected]>
Hi,

I noticed the flac decoder has checks to disable the use of --skip and 
--until if the total sample count is 0.
Why that?

This was quite annoying for me because I handle files that are longer 
than the total sample count field and have therefore set to 0.
I commented the code for the checks out and it worked just fine. Maybe 
there should be a warning like "File ended before `until` value was 
reached" in case the until value is not reached, but other than that I 
don't see a problem. Of course you would also need to handle the case 
where skip seeks over the end of the file.

Is there any other situation where this functionality could cause issues?

Best regards
Stefan

_______________________________________________
flac-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]