Closed baumanj closed 1 year ago
I think the first use of NUL ends the field, otherwise it would be ambiguous. Consider the mett
box:
class TextMetaDataSampleEntry() extends MetaDataSampleEntry ('mett') {
utf8string content_encoding; // optional
utf8string mime_format;
TextConfigBox (); // optional
}
if what is encoded is a\0b\0c\0
, how do you know what is what?
I think we should replace:
null-terminated means that the last character of a string is Unicode NUL
with
null-terminated means that the first Unicode NUL character terminates the string
change to say that the string is terminated by the first NUL character and there shall be at least one such.
This is clarified in the 8th edition. https://dms.mpeg.expert/doc_end_user/documents/140_Mainz/wg11/MDS21996_WG03_N00717.zip
Based on this text from ISOBMFF (ISO/IEC 14496-12:2020) § 4.2.1:
It's not entirely clear what to do with a value containing multiple NUL characters.
Consider the following, valid
hdlr
box:If the "a" in "libavif" were replaced with NUL, would it still be valid? And if so, would the value of the
name
field of thehdlr
box correctly be "lib" or "lib\0vif"?