mirror of
https://github.com/taglib/taglib.git
synced 2025-07-23 07:24:30 -04:00
Be more paranoid about checking MP4 files
To consider something a valid MP4 file, it must have a 'moov' atom. Otherwise it's marked as invalid and we won't try to read/write tags. CCBUG:216819 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1062426 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -113,6 +113,13 @@ MP4::File::read(bool readProperties, Properties::ReadStyle audioPropertiesStyle)
|
||||
return;
|
||||
}
|
||||
|
||||
// must have a moov atom, otherwise consider it invalid
|
||||
MP4::Atom *moov = d->atoms->find("moov");
|
||||
if(!moov) {
|
||||
setValid(false);
|
||||
return;
|
||||
}
|
||||
|
||||
d->tag = new Tag(this, d->atoms);
|
||||
if(readProperties) {
|
||||
d->properties = new Properties(this, d->atoms, audioPropertiesStyle);
|
||||
|
Reference in New Issue
Block a user