Adjust child offset of meta atom only if within udat

Not sure how meta atoms outside of udat are structured. But
the files from my Android camera puts a meta atom directly under
move which doesn't have 4 additional bytes before the first child.
This commit is contained in:
Martchus 2018-07-09 14:03:41 +02:00
parent f27dbd8934
commit 687bd976f9
1 changed files with 4 additions and 1 deletions

View File

@ -266,7 +266,10 @@ uint64 Mp4Atom::firstChildOffset() const
if (isParent()) {
switch (id()) {
case Meta:
return headerSize() + 0x4u;
if (parent() && parent()->id() == Mp4AtomIds::UserData) {
return headerSize() + 0x4u;
}
return headerSize();
case DataReference:
return headerSize() + 0x8u;
default: