The class ID3v2ExtendedHeader incorrectly uses the
ID3v2.4.0 specification when parsing the bytes of the
extended header. Unfortunately, the ID3v2.3.0 and
ID3v2.4.0 are not compatible in the way they layout the
extended header.
When parsing an MP3 file containing a ID3v2.3.0 tag,
the following exception is thrown:
helliker.id3.ID3v2FormatException: The number of found
flag bytes in the
extende
d header is not equal to the number specified in the
extended header.
at helliker.id3.ID3v2ExtendedHeader.parseFlags
(ID3v2ExtendedHeader.java:
235)
at
helliker.id3.ID3v2ExtendedHeader.readExtendedHeader
(ID3v2ExtendedHead
er.java:197)
at helliker.id3.ID3v2ExtendedHeader.<init>
(ID3v2ExtendedHeader.java:152)
at helliker.id3.ID3v2Tag.<init>(ID3v2Tag.java:150)
at helliker.id3.MP3File.<init>(MP3File.java:203)
at helliker.id3.MP3File.<init>(MP3File.java:150)
at helliker.id3.MP3File.<init>(MP3File.java:130)
I've attached a jar file containing the fixed source
for this problem. It includes IDv2Tag, ID3v2Header,
and ID3v2ExtendedHeader. This code doesn't have too
much testing mileage yet...so far all I've tested is
the read case. I have done no testing of writes...
gzip'd jar file containing bug fix patch.
Logged In: YES
user_id=1031491
see http://id3lib.sourceforge.net/id3/id3v2.3.0.html#sec3.1
for description of ID3v2.3.0 extended header.
the description of the ID3v2.4.0 extended header can be
found at:
http://id3lib.sourceforge.net/id3/id3v2.4.0-structure.txt