You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry about the big file and git lfs use. I tried to trim it down to a smaller example but couldn't get a smaller test file that reproduced the bug.
Summary
Adding a genre tag to an existing flac file renders the file unplayable. Performing the same operation via the metaflac command line tool does not exhibit the same issue.
Perhaps this is because the file has an empty GENRE= tag?
Expected behavior
No response
Assets
No response
The text was updated successfully, but these errors were encountered:
Sorry about the big file. I wasn't able to trim it down to a smaller sample and still reproduce the issue. It might just be that the file itself is corrupted but it does play and it can be edited with metaflac.
Don't worry about the file size, any asset is better than none.
This was actually due to me mishandling PADDING blocks. I've never seen a file with padding anywhere but the end, so when writing it would make the assumption that it was at the end. That assumption means the Last-metadata-block flag wasn't getting set. Decoders need that flag to figure out where the audio data starts, and since it wasn't set they'd assume the stream was corrupted.
I made #445 to track padding usage, but for now I just have it discard PADDING blocks that aren't at the end of the header.
Reproducer
I set up a repro to demonstrate the issue here:
https://github.com/milesegan/lofty-flac-bug
Sorry about the big file and git lfs use. I tried to trim it down to a smaller example but couldn't get a smaller test file that reproduced the bug.
Summary
Adding a genre tag to an existing flac file renders the file unplayable. Performing the same operation via the metaflac command line tool does not exhibit the same issue.
Perhaps this is because the file has an empty
GENRE=
tag?Expected behavior
No response
Assets
No response
The text was updated successfully, but these errors were encountered: