Taglib-1.4; Not writing ID3v2 Tags?

Thomas C R Spurden thomasspurden at gmail.com
Thu Oct 12 19:46:36 CEST 2006


I am using TagLib 1.4-r1 installed from Gentoo portage (also tried 1.4)
on Linux 2.6.17 and GCC 3.4.6

[tagtest.cpp]
#include <tag.h>
#include <mpegfile.h>
#include <id3v2tag.h>

int main() {
        TagLib::MPEG::File f("test.mp3");
        f.tag()->setAlbum("Flibble");
        f.save(TagLib::MPEG::File::ID3v2);
}
[/tagtest.cpp]

[command line]
% g++ tagtest.cpp -o tagtest `taglib-config --cflags --libs`
% ./tagtest
% id3v2 --list test.mp3
test.mp3: No ID3 tag
% id3info test.mp3

*** Tag information for test.mp3
*** mp3 info
MPEG1/layer III
Bitrate: 128KBps
Frequency: 44KHz
[/command line]

test.mp3 is just a copy of a random mp3 from my music library
(with all tags removed).  Tried with a few different mp3's with the
same results, including leaving all tags intact first - in this case it
strips the ID3v2. The code does not affect the ID3v1 tag. If I use
f.save() then it writes the ID3v1 tag correctly.

Am I missing something in the API?  I had a quick look at the JuK
source and couldn't see any differences in the way the API is used (but
I didn't look /that/ hard).

Any suggestions would be very greatfully accepted.

***Please CC me as I'm not on the list***

Thanks,
Tom
-- 
Thomas C R Spurden  (0xBB944725)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20061012/e26ee532/attachment.pgp 


More information about the taglib-devel mailing list