Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MXF parsing: terminate strings on the first null character (#373)
Per SMPTE ST 377-1:2019, a "zero value" can be used to terminate a string. So, discard any data after the first null character found (if any). This has the same effect as the implementation for strings in regxmllib at: https://github.com/sandflow/regxmllib/blob/b47b0cdbd6dbf51cae4fb14c3a6a827eb3e0e2cc/src/main/java/com/sandflow/smpte/regxml/FragmentBuilder.java#L902 Note that regxmllib also uses the same `readCharacters` method for MXF properties with a Type of Type Kind "Character", and allows values of this Type to contain the null character. Photon does not support such "Character" Types (and indeed none have ever been used in MXF according to the SMPTE Metadata Registers). So, no consideration is given to these Types in this patch.
- Loading branch information