SIGKILL Fetching Album Art

Timothy Stoyanovski stoyanovski.development at gmail.com
Tue Mar 21 03:45:15 UTC 2017


Hello,

Using OSX I'm receiving a SIGKILL while attempting to get APIC tag. Win32
is fine, only OSX faces this issue.

Below if the method used, any input as to how to catch this error or avoid
it would be appreciated:


void audiotags_file_art(const TagLib_File *file, int id)
{
    const TagLib::File * f = reinterpret_cast<const TagLib::File *>(file);
    TagLib::MPEG::File * mpegFile = dynamic_cast<TagLib::MPEG::File
*>(const_cast<TagLib::File *>(f));
    if (mpegFile!=nullptr) {
        if (mpegFile->hasID3v2Tag()) {
            TagLib::ID3v2::Tag * id3v2 = mpegFile->ID3v2Tag(false);
            const TagLib::ID3v2::FrameList frameList =
id3v2->frameListMap()["APIC"];
            for(auto it = frameList.begin(); it != frameList.end(); it++) {
                TagLib::ID3v2::AttachedPictureFrame * frame =
(TagLib::ID3v2::AttachedPictureFrame *)(*it);
                if (frame->size() > 0) {
                    char *key = ::strdup("APIC");
                    char *val = ::strdup(frame->picture().toBase64().data());
                    go_map_audioproperties(id, key, val);
                    free(key);
                    free(val);
                }
            }
        }
    }
}




-- 
Timothy Stoyanovski - Developer
*PHP + Frontend*

*Open Source Contributions: https://github.com/stoyvo
<https://github.com/stoyvo>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20170320/3b793b14/attachment.html>


More information about the taglib-devel mailing list