New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how total samples in stream should be used #110
Comments
|
As far as I know, total samples is just informational, and can be zero as well, meaning it is unknown. The blocksize in the frame header of the last block signals the length of the last block. Still, this needs to be clarified indeed. |
|
Ok. Would it be an error if a non-zero total samples does not match up with actual number of samples in all frames? |
|
I'm not sure anymore whether anything should be written on this topic except for a generic statement that the handling of non-conformant streams is left undefined and up to the decoder. Currently libFLAC stops decoding after reaching the number of samples set in streaminfo, but ffmpeg doesn't. |
|
On one side I consider that such field should be informational only because I see no reason the decoder should stop if there is more content, on the other side issue is that the "reference" decoder stops... With FFV1 we faced some issues with old versions of the reference decoders and provided warnings. Maybe same here?
|
|
The reference decoder stops because of performance reasons which may not be really relevant anymore What about adding a general statement to the description of the streaminfo block, like this
|
I've seen FLAC files in the wild where non-streaminfo-block-size aligned number samples in a stream is signalled using total samples but the last frame does not have a variable block size. For example ffmpeg currently seems to decode all frame samples in this case and ignores total samples.
Also maybe good to make it clear what the MD5 sum should be based on, the total samples or all frame samples?
The text was updated successfully, but these errors were encountered: