Skip to content

FLAC: Fix corruption of shrinking metadata - #641

Merged
Serial-ATA merged 1 commit into
mainfrom
flac-fix
Apr 12, 2026
Merged

Serial-ATA merged 1 commit into
mainfrom
flac-fix

Conversation

@Serial-ATA

Copy link
Copy Markdown
Owner

closes #640

@abique

abique commented Apr 11, 2026

Copy link
Copy Markdown

Good evening,

Do you have a test that tries to change an existing flac file metadata and then checks that the file is still valid?
Maybe by invoking flac -t x.flac or by reading it using symphonia?

Cheers,
Alex

@Serial-ATA

Copy link
Copy Markdown
Owner Author

@abique Yeah, I added a test for each tag type that checks its validity after a grow and shrink. I haven't pushed it here yet since it actually caught another bug 😪. I'll try to get this out by tomorrow

@abique

abique commented Apr 11, 2026 •

Copy link
Copy Markdown

I confirm the fix (tested editing two different files).

Thank you very much 👍

@Serial-ATA Serial-ATA added this to the 0.24.0 milestone Apr 12, 2026
@Serial-ATA
Serial-ATA merged commit 214a9b5 into main Apr 12, 2026
4 checks passed
@Serial-ATA
Serial-ATA deleted the flac-fix branch April 12, 2026 16:35
/// 4. Rewrites the large tag
/// 5. Checks the file again with FFmpeg
fn tag_resize_test(path: &str, tag_type: TagType) {
fn check_file(path: &Path) {

@abique abique Apr 13, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to combine multiple ways to test the flac file here maybe? For example in case of flac you could test both ffmpeg and flac -t. You could also have on test that is simply about reading the file using symphonia.

Maybe better 3 tests than 1? :-)

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.

FLAC corruption in 0.23.3

2 participants