Commit 909b59dd authored by Seungha Yang's avatar Seungha Yang 🐑

typefindfunctions: Add support HEIF file format finding

A HEIF compatiable file (i.e., mif1 brand) needs special concern
since 'moov' atom is not mandatory for the file although HEIF is
a variant of ISOBMFF

See http://standards.iso.org/ittf/PubliclyAvailableStandards/c066067_ISO_IEC_23008-12_2017.zip
parent 4e80ea64
Pipeline #34553 passed with stages
in 189 minutes and 32 seconds
......@@ -3350,6 +3350,12 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
break;
}
if (STRNCMP (&data[4], "ftypmif1", 8) == 0) {
tip = GST_TYPE_FIND_MAXIMUM;
variant = "heif";
break;
}
/* box/atom types that are in common with ISO base media file format */
if (STRNCMP (&data[4], "moov", 4) == 0 ||
STRNCMP (&data[4], "mdat", 4) == 0 ||
......@@ -3395,6 +3401,10 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
tip = GST_TYPE_FIND_MAXIMUM;
variant = "iso";
goto done;
} else if (STRNCMP (&data[new_offset], "mif1", 4) == 0) {
tip = GST_TYPE_FIND_MAXIMUM;
variant = "heif";
goto done;
}
new_offset += 4;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment