Taglib 1.9.1 upgrade not reading embedded artwork
wifanlith
wifanlith at googlemail.com
Mon Oct 21 08:48:58 UTC 2013
I did think that was odd when I first looked at the code, and I looked at
changed it before, but it caused a crash. I have done it again now, and it
is still crashing.
It gets past the f.tag() now and into:-
/MPEG::File* mpegFile = dynamic_cast<MPEG::File*>(f.file());
if (mpegFile) {
if(mpegFile->hasID3v2Tag())
{
// qDebug() << ".........[ARTWORK] extractEmbeddedArtwork() -> checking MP3
file" << path;
return extractID3Artwork(path, mpegFile->ID3v2Tag());
}
} // of MPEG case/
which looks fine to me, but when its gets into /return
extractID3Artwork(path, mpegFile->ID3v2Tag());/
it crashes out at the top of it:
/QByteArray extractID3Artwork(QString path, ID3v2::Tag* id3)
{
if (!id3) {
//qDebug() << ".........[ARTWORK] extractID3Artwork() -> file with
no ID3v2 tag ->" << path;
return QByteArray();
}
// Get the list of frames for a specific frame type
ID3v2::FrameList l = id3->frameListMap()["APIC"];
if (l.isEmpty()) {
//qDebug() << ".........[ARTWORK] extractID3Artwork() -> file with no
APIC frames ->" << path;
return QByteArray();
}
ID3v2::AttachedPictureFrame* apf;
for (unsigned int i=0; i<l.size(); ++i) {
apf = static_cast<TagLib::ID3v2::AttachedPictureFrame*>(l[i]);
return convertBytes(apf->picture());
}
return QByteArray();
}/
the call stack says:-
/>
SXXXX.exe!std::_Tree<std::_Tmap_traits<TagLib::ByteVector,TagLib::List<TagLib::ID3v2::Frame
*>,std::less<TagLib::ByteVector>,std::allocator<std::pair<TagLib::ByteVector
const ,TagLib::List<TagLib::ID3v2::Frame *> > >,0> >::_Lbound(const
TagLib::ByteVector & _Keyval={...}) Line 1264 + 0x8 bytes C++
SXXXX.exe!std::_Tree<std::_Tmap_traits<TagLib::ByteVector,TagLib::List<TagLib::ID3v2::Frame
*>,std::less<TagLib::ByteVector>,std::allocator<std::pair<TagLib::ByteVector
const ,TagLib::List<TagLib::ID3v2::Frame *> > >,0> >::lower_bound(const
TagLib::ByteVector & _Keyval={...}) Line 1004 + 0x10 bytes C++
SXXXX.exe!std::map<TagLib::ByteVector,TagLib::List<TagLib::ID3v2::Frame
*>,std::less<TagLib::ByteVector>,std::allocator<std::pair<TagLib::ByteVector
const ,TagLib::List<TagLib::ID3v2::Frame *> > > >::operator[](const
TagLib::ByteVector & _Keyval={...}) Line 169 + 0x10 bytes C++
SXXXX!TagLib::Map<TagLib::ByteVector,TagLib::List<TagLib::ID3v2::Frame
*> >::operator[](const TagLib::ByteVector & key={...}) Line 164 C++
SXXXX.exe!extractID3Artwork(QString path={...}, TagLib::ID3v2::Tag *
id3=0x001bd548) Line 115 + 0x26 bytes C++
SXXXX.exe!extractEmbeddedArtwork(TagLib::FileRef f={...}, QString
path={...}) Line 63 + 0x28 bytes C++/
Any ideas?
G
--
View this message in context: http://kde.6490.n7.nabble.com/Taglib-1-9-1-upgrade-not-reading-embedded-artwork-tp1546223p1546576.html
Sent from the taglib-devel mailing list archive at Nabble.com.
More information about the taglib-devel
mailing list