lofty-rs icon indicating copy to clipboard operation
lofty-rs copied to clipboard

Fixing corrupting of FLAC files where there is no padding or no metada blocks

Open phayes opened this issue 3 months ago • 1 comments

This is the companion PR to https://github.com/Serial-ATA/lofty-rs/issues/549

I'm not feeling entirely confident that I'm following all the various accouting being done here to keep track of everything.

I think there's still an outsstanding bug where we're not setting the last flag correctly if we have no padding and are removing all picture blocks.

However, if you review it and you think I have it correct, this should fix the FLAC corruption problems I've been seeing.

phayes avatar Sep 28 '25 19:09 phayes

Hm, yeah I don't think any of the FLAC tests have a file with just a single metadata block. I'll test it out in a couple days when I have time. Thanks!

Serial-ATA avatar Sep 30 '25 03:09 Serial-ATA

Finally got around to this in #583, thanks for working on this!

Serial-ATA avatar Dec 14 '25 21:12 Serial-ATA