Closed philipnbbc closed 1 year ago
Perhaps it makes sense for @matthewmarks-bbc to review this PR too?
It would be good to test that IMF Track Files made with this update have a KLV Fill at the end of the Header Partition where the "data" of the KLV Fill item is at least 8192 bytes in length.
MXF Explorer: "Pack #15" is "Fill Item"; next Pack is "Body partition". For VIDEO_33b68ff0-b42c-400f-ba1c-5d2288bfcf05.mxf (the ABCD123E_03 Video Track File), the length of this is 8027. Same if transwrapped with existing executable.
The Baton report says "KLVFill after header partition is 7.86 KB. It should be at least 8 KB as per specification".
8027/1024 = 7.84 which tallies with this - "KB" must mean kiB.
If created using proposed raw2bmx it is 15902; if created using proposed bmxtranswrap, it is 15940. This is 15.5 kiB.
Therefore the file is now compliant.
Updates to the header metadata when completing the write was found to consume more than 256 bytes, the original margin on top of the target KLV Fill size. This caused file validation failures. This commit changes the margin to 8K.
Fixes https://github.com/bbc/bmx/issues/37