MPEG::File::save() ignores tag()->header()->setMajorVersion()

Anton Sergunov setosha at gmail.com
Tue Jun 14 12:40:37 CEST 2011


Fixed realy strange behavior

TagLib::MPEG::FileRef fref(filename); // .mp3 file without any tags
TagLib::MPEG::File* file = fref.file();
TagLib::ID3v2::Tag *tag = file->ID3v2Tag();
ASSERT(tag);
tag->header()->setMajorVersion(3); // !!!
// set other tag fields
fref.save();

Got ID3v2.4 tags in file.

PS. Also added constructor MP4::Tag::Tag()

PPS. Please do thomthing to make it compilable under mingw (about
isWritable()/isReadable())
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20110614/cc04c94b/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: versionFromHeader.patch
Type: application/octet-stream
Size: 3051 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20110614/cc04c94b/attachment.dll 


More information about the taglib-devel mailing list