Patch for issues in ID3v2::AttachedPictureFrame and ID3v2::Frame in latest SVN version

Andre Beckedorf eviljazz at
Sat Oct 13 23:34:07 CEST 2007


the latest TagLib version from the SVN repository doesn't read attached 
pictures from an ID3v2 header correctly.
With the code simplification in 
TagLib::ID3v2::AttachedPictureFrame::parseFields (using readStringField) 
the reading of the picture type was removed, which results in a one-off 
situation for reading the comment and data of the APIC frame. Also 
TagLib::ID3v2::Frame::readStringField is broken as it always returns an 
empty string.
Attached is a patch to fix the problems.

I'm statically compiling and linking TagLib into my embedded media 
player for Qtopia/Sharp Zaurus ( as 
part of the code. Unfortunately I can't use RTTI in the code as Qtopia, 
which I'm linking against, is compiled with -fno-rtti. Thus I had to 
change all occurences of dynamic_cast to static_cast to work around the 
compilation problems. IMO it's okay to change those to static casts 
since simple checks against the frame type string are made in most 
cases. These changes are included in the patch.


P.S.: Scott, thanks for making TagLib! You rock!

More information about the taglib-devel mailing list