Skip to content

Conversation

Serial-ATA
Copy link
Owner

@Serial-ATA Serial-ATA commented Jul 2, 2024

For files with a VBR header:
Thanks to @naglis for correcting the length calculation. (issue: #412)

For files without a VBR header:
rev_search_for_frame_header would get tripped up on files with trailing data
that looked like a frame sync (ex. 0xFFFF). This would also result in durations that are
slightly off.

For now, VBR streams are still assumed to be CBR. I have not seen a file this does not
work for yet. Eventually it would be nice to have more accurate calculation, but that will require we read the entire file.

closes #412

For files with a VBR header:
Thanks to @naglis for correcting the length calculation. (issue: #412)

For files without a VBR header:
`rev_search_for_frame_header` would get tripped up on files with trailing data
that looked like a frame sync (ex. 0xFFFF). This would also result in durations that are
slightly off.

For now, VBR streams are still assumed to be CBR. I have not seen a file this does not
work for yet. Eventually it would be nice to have more accurate calculation, but that will require we read the *entire* file.
@Serial-ATA Serial-ATA merged commit b7f86d2 into main Jul 2, 2024
@Serial-ATA Serial-ATA deleted the mp3-fix branch July 2, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect MP3 duration
1 participant