Fixing corrupting of FLAC files where there is no padding or no metada blocks
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.
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!
Finally got around to this in #583, thanks for working on this!