Closed DCNick3 closed 1 year ago
cc @jessa0 (as you are the one who wrote the code originally in #91): is assuming that contents of the Meta
box are all boxes a sane approach? I don't think this can be parsed in any other way..
The spec seems to allow the hdlr box to be located at any place in the meta box.
I'm not sure how you're interpreting the spec in that way? According to the syntax description in ISO 14496-12-2012 section 8.11.1.2, the HandlerBox
comes first in the MetaBox
, followed by a bunch of optional typed boxes, and a Box[]
at the end. I don't have access to a spec of the syntax description language, but everywhere else in the spec, ordering in the class
determines the order of data in the serialized file..
Oh, I've actually look at the verbal description instead of the syntactic one. The verbal one said "The 'meta' box is required to contain a ‘hdlr’ box indicating the structure or format of the ‘meta’ box contents.", so I figured "contain" is "contains anywhere"
The syntactic one does give an explicit order though...
So... Apparently this is not according to standard, but I do have a file, which seems to be produced by TMPGEnc Video Mastering Works 7 Version 7.0.15.17
(as indicated by the metadata) which does have the ilst
box before the HandlerBox
I think it's still a good idea to support it, as the spec still guarantees that the contents of the MetaBox
are all boxes
So... Apparently this is not according to standard, but I do have a file, which seems to be produced by
TMPGEnc Video Mastering Works 7 Version 7.0.15.17
(as indicated by the metadata) which does have theilst
box before theHandlerBox
Oh yikes, so I see we're out of spec territory then. Since you do have a sample from a real encoder with this behavior, I do agree with "being liberal with what you accept" here.
To actually answer your original question, yes, all the data should at least be Boxes, so your PR seems like an improvement in that respect.
Rebased and squashed, CI fails again due to an unrelated lint =(
Thanks @DCNick3 and @jessa0.
The spec seems to allow the hdlr box to be located at any place in the meta box. This commit addresses that.