<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Greetings Tag Masters!<div class=""><br class=""></div><div class="">I am in process of writing some code that adds a custom user text frame to an ID3v2 tag. The approach I’m taking looks like:</div><div class=""><br class=""></div><div class="">*** snip snip ***</div><div class="">TagLib::MPEG::File *file=new TabLib::MPEG::File(“my_file.mp3”,false);</div><div class="">TagLib::ID3v2::Tag *tag=(TagLib::ID3v2::Tag *)file->tag();</div><div class=""><br class=""></div><div class="">TagLib::ID3v2::UserTextIdentificationFrame *frame=new TagLib::ID3v2::UserTextIdentificationFrame(TagLib::String::UTF8);</div><div class="">frame->setDescription(“foo”);</div><div class="">frame->setText(“some structured text”);</div><div class="">tag->addFrame(frame);</div><div class="">*** snip snip ***</div><div class=""><br class=""></div><div class="">This blows up with a SIGSEGV at the addFrame() invocation. I suspect that my problem may be with the simplistic cast from TagLib::Tag * to TabLib::ID3v2::Tag *, but I’ve not been able to find any other way to get access to the TagLib::ID3v2::addFrame() method. I’ve also experimented with using the PropertyMap mechanism —e.g. inserting a key of “TXXX:foo” —, but this seems to be ignored by TagLib::PropertyMap::insert().</div><div class=""><br class=""></div><div class="">Perusal of the API docs as well as Google searches have brought up a fair amount of information about *reading* TXXX frames (mostly through use of the PropertyMap interface), but precious little about how to *write* such using TagLib. What’s the correct way of going about this? Any help greatly appreciated!</div><div class=""><br class=""></div><div class="">Cheers!</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|----------------------------------------------------------------------|</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">| Frederick F. Gleason, Jr. |              Chief Developer             |</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|                           |              Paravel Systems             |</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|----------------------------------------------------------------------|</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|          A room without books is like a body without a soul.         |</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|                                         -- Cicero                    |</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">|----------------------------------------------------------------------|</span></div></div></body></html>