ID3v2 Tags break initial frame sync


In Bitstream.loadID3v2(Stream), around line 201, size is the ID3 tag's full size (including the 10 byte "header"). The stream, however, is positioned after the "header". This makes the read overshoot the end of the tag by 10 bytes, which causes errors on certain MP3 files (I have some that try to sync in the middle of the first frame because of this).

The fix is to either:
1) Seek back 10 bytes before reading the raw tag, or
2) Allocate size - 10 bytes for the buffer (rawid3v2).

I've tried both, and they both seem to work. I think #2 is probably the better option, though.
Closed Sep 12, 2014 at 3:19 PM by ioctlLR
Fixed in re-write. :)


markheath wrote Oct 17, 2012 at 1:07 PM

thanks for reporting. I'm actually radically reworking some of this code to make it ready for Windows 8. I''ll try to make sure our fix is included.

wrote Feb 13, 2013 at 11:11 PM

wrote Sep 12, 2014 at 3:19 PM