bbc / bmx

Library and utilities to read and write broadcasting media files. Primarily supports the MXF file format
BSD 3-Clause "New" or "Revised" License
57 stars 16 forks source link

Write last index segment in footer for body partitions flavour #34

Closed philipnbbc closed 10 months ago

philipnbbc commented 10 months ago

https://github.com/bbc/bmx/issues/30 changed OP1a to always write the last index table segment in a index-only body partition and not in the footer partition. That change needs to be partially reverted because it broke compatibility with RDD 44 section 5.3.2 which states that for files that are not segmented "In such a file, all Index Tables shall be stored in the Footer Partition, the Header Partition, or both.".

For the body partition flavour, if there are multiple index table segments and the index is repeated, then the last index table segment is written to a index-only body partition. Otherwise the last index table segment is written to the footer partition. If there is only 1 index table segment then it will be written to the footer partition, whether index repetition is selected or not.