dhowden / tag

ID3, MP4 and OGG/FLAC metadata parsing in Go
BSD 2-Clause "Simplified" License
568 stars 77 forks source link

Fix a bug in Sum() and add all id3frames in Raw() #9

Closed xhenner closed 9 years ago

xhenner commented 9 years ago

The Seek in SumID3v2() didn't take into account the size of the ID3v2 Header (10 bytes). Thus when tagging the same file with or without it's tag, there was a discrepancy. (

And I've added a default case when parsing the id3v2 tags, by storing the binary content to Raw()

xhenner commented 9 years ago

Example of the bug with Sum():

24/05 20:33 % ./sum test.mp3 889944bbc8526849f5927829fa86076778650814 24/05 20:33 % id3v2 -D test.mp3 Stripping id3 tag in "test.mp3"...id3v1 and v2 stripped. 24/05 20:34 % ./sum test.mp3 5001f258ed4f79f7308df190d0b99d0aa2e7fcbe

test.mp3 is the file I gave you the last time, but any mp3 file should do