From 65a6a4e225fff1288148de92721418e1c634713b Mon Sep 17 00:00:00 2001 From: Tim Malseed Date: Mon, 18 Mar 2019 00:20:08 +1100 Subject: Minor fix for mp4 media header v0 minimum size check (#894) 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 --- taglib/mp4/mp4properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taglib/mp4/mp4properties.cpp b/taglib/mp4/mp4properties.cpp index 261d58ae..26051a76 100644 --- a/taglib/mp4/mp4properties.cpp +++ b/taglib/mp4/mp4properties.cpp @@ -199,7 +199,7 @@ MP4::AudioProperties::read(File *file, Atoms *atoms) length = data.toInt64BE(32); } else { - if(data.size() < 24 + 4) { + if(data.size() < 24 + 8) { debug("MP4: Atom 'trak.mdia.mdhd' is smaller than expected"); return; } -- cgit v1.2.3