Add a comment to avifCheckItemID() about the source of the nonzero item_ID requirement #2476
Description
@maryla-uc @vigneshvg @vrabaud @y-guyon FYI.
In src/read.c, the avifCheckItemID()
function requires that the value of item_ID
be nonzero. We should add a comment about the source of this requirement.
I am having trouble finding this requirement in ISOBMFF, HEIF, and MIAF. The closest thing I can find is the following paragraph in ISO/IEC 14496-12:2022 (ISOBMFF), Clause 8.11.1.1 on the definition of the MetaBox:
Derived specifications may further restrict the criteria for uniqueness: unique among the
item_IDs
in
both file and movie-level boxes, or unique within that set extended with thetrack_ID
of the tracks in a
movie box. Theitem_ID
value of 0 should not be used, and shall not be used when the set is extended to
includetrack_IDs
.
But the last sentence uses "should not" in the initial, general part of the statement, and uses "shall not" only in the more specific part of the statement.