The second track contains an `fmra` (OriginalFormatBox) box with the following 4 bytes values: 109, 112, 180, 97. This does not represent a valid UTF-8 string, so versions of `mp4parse-rust` prior to [761cdd8](https://github.com/mozilla/mp4parse-rust/commit/761cdd8082f198abe9434935846d6cd4475c5512) would fail to parse the file since the `read_frma` function returned a `Result<String>`. Subsequent versions (which have not yet been added to mozilla-central) change the return type to `Result<TryString>` (an alias for `TryVec<u8>`, a vector which uses fallible allocation), and so parsing succeeds. According to ISO/IEC 14496-12:2015, the `frma` box's contents are not guaranteed to be UTF-8, so this file should successfully parse: **8.12.2.2 Syntax** ``` aligned(8) class OriginalFormatBox(codingname) extends Box ('frma') { unsigned int(32) data_format = codingname; // format of decrypted, encoded data (in case of protection) // or un-transformed sample entry (in case of restriction // and complete track information) } ``` **8.12.2.3 Semantics** `data_format` is the four‐character‐code of the original un‐transformed sample entry (e.g. ‘mp4v’ if the stream contains protected or restricted MPEG‐4 visual material).
Bug 1635960 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
The second track contains an `fmra` (OriginalFormatBox) box with the following 4 bytes values: 109, 112, 180, 97. This does not represent a valid UTF-8 string, so versions of `mp4parse-rust` prior to [761cdd8](https://github.com/mozilla/mp4parse-rust/commit/761cdd8082f198abe9434935846d6cd4475c5512) would fail to parse the file since the `read_frma` function [returned a `Result<String>`](https://github.com/mozilla/mp4parse-rust/blob/921314e7baa8a26710269de53251a22b1cf3943d/mp4parse/src/lib.rs#L3531). Subsequent versions (which have not yet been added to mozilla-central) [change the return type to `Result<TryString>`](https://github.com/mozilla/mp4parse-rust/blob/761cdd8082f198abe9434935846d6cd4475c5512/mp4parse/src/lib.rs#L3654) (an alias for `TryVec<u8>`, a vector which uses fallible allocation), and so parsing succeeds. According to ISO/IEC 14496-12:2015, the `frma` box's contents are not guaranteed to be UTF-8, so this file should successfully parse: **8.12.2.2 Syntax** ``` aligned(8) class OriginalFormatBox(codingname) extends Box ('frma') { unsigned int(32) data_format = codingname; // format of decrypted, encoded data (in case of protection) // or un-transformed sample entry (in case of restriction // and complete track information) } ``` **8.12.2.3 Semantics** `data_format` is the four‐character‐code of the original un‐transformed sample entry (e.g. ‘mp4v’ if the stream contains protected or restricted MPEG‐4 visual material).