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

ID3v2: Remove invalid padding on write

Open Serial-ATA opened this issue 8 months ago • 0 comments

It's a common issue that padding will often stick around between tag edits, as it is typically not properly accounted for in the tag header size.

We currently just get the tag size from the header and replace that many bytes with the new tag when writing, similar to other libraries. The problem is, when a tag has invalid padding that isn't included in the size, it will remain in the file indefinitely.

It may be worth removing the padding if we can reliably detect it without destroying any important data.

Serial-ATA avatar Oct 02 '23 13:10 Serial-ATA