diff options
author | Tim Malseed <t.malseed@gmail.com> | 2019-03-18 00:20:43 +1100 |
---|---|---|
committer | Stephen F. Booth <me@sbooth.org> | 2019-03-17 08:20:43 -0500 |
commit | 660748210fed054e886095c75c8e9f62276f4320 (patch) | |
tree | 6ebcb666d579dcbad14b7583ece57052285837e4 | |
parent | 5cb589a5b82c13ba8f0542e5e79629da7645cb3c (diff) |
Minor fix for mp4 media header v0 minimum size check (#895)
Mp4 media header (mdhd) v0 atoms are a minimum of 8 bytes for size & type information, plus 24 bytes for remaining entries (`24 +8`) bytes in total, rather than (`24 + 4`).
See https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25615
-rw-r--r-- | taglib/mp4/mp4properties.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/taglib/mp4/mp4properties.cpp b/taglib/mp4/mp4properties.cpp index 4bb4d67b..e863a375 100644 --- a/taglib/mp4/mp4properties.cpp +++ b/taglib/mp4/mp4properties.cpp @@ -179,7 +179,7 @@ MP4::Properties::read(File *file, Atoms *atoms) length = data.toLongLong(36U); } else { - if(data.size() < 24 + 4) { + if(data.size() < 24 + 8) { debug("MP4: Atom 'trak.mdia.mdhd' is smaller than expected"); return; } |