Skip unknown MP4 boxes

This commit is contained in:
Stephen F. Booth 2024-05-16 09:21:38 -05:00
parent 89af92333c
commit a5633cdb03
No known key found for this signature in database
GPG Key ID: 900AAC885063A183

View File

@ -95,13 +95,6 @@ MP4::Atom::Atom(File *file)
}
d->name = header.mid(4, 4);
for(int i = 0; i < 4; ++i) {
if(const char ch = d->name.at(i); (ch < ' ' || ch > '~') && ch != '\251') {
debug("MP4: Invalid atom type");
d->length = 0;
file->seek(0, File::End);
}
}
for(auto c : containers) {
if(d->name == c) {
@ -131,6 +124,8 @@ MP4::Atom::Atom(File *file)
}
}
debug("MP4: Skipping atom '" + d->name + "'");
file->seek(d->offset + d->length);
}