gpac / ComplianceWarden

A pluggable compliance checker (ISOBMFF, HEIF/MIAF/AVIF, AV1 HDR10+)
https://gpac.github.io/ComplianceWarden-wasm/
Other
16 stars 7 forks source link

MIAF profile and brand checks are skipped #7

Closed aklemets closed 4 years ago

aklemets commented 4 years ago

The code that is supposed to check if a file complies with the specified MIAF brand and profile appears to be skipped. Consider the following code:

static bool usesBrand(Box const& root, uint32_t brandFourcc) { for(auto& box : root.children) if(box.fourcc == FOURCC("ftyp")) for(auto& sym : box.syms) if(strcmp(sym.name, "compatible_brand")) if(sym.value == brandFourcc) return true;

This checks only the symbols whose name is not "compatible_brand". To fix it, insert a "!" symbol before the call to strcmp. This was found in spec_miaf_profiles.cpp but there are multiple occurrences of the same pattern in spec_miaf_brand.cpp as well.