sandflow / regxmllib

Convert MXF to XML: RegXML (SMPTE ST 2001-1) tools and libraries
BSD 2-Clause "Simplified" License
35 stars 14 forks source link

Exception on Static Local Tag missing from Preface #66

Closed thomasheritage closed 9 years ago

thomasheritage commented 9 years ago

I have some MXF files produced by a well-known manufacturer which have "legacy" (AAF-style) Meta Definitions encoded before the Preface. The Static Local Tags used by some of the elements in these Local Sets are not in the Primer Pack (but they are in the Groups Register). This is not technically allowed by 377-1.

If regxmllib encounters one of these problematic Static Local Tags it causes the entire application to terminate. This is unhelpful behaviour because in the case described above the Local Sets containing these problematic Static Local Tags will not appear in the output anyway (because they're not referenced by the Preface). It should be noted that many other tools cope OK with these MXF files.

Possible solutions (most preferable first): 1) Look up the Static Local Tag in the Groups Register if it is not present in the Primer Pack. Although all Static Local Tags are supposed to be in the Primer Pack this is still a legitimate approach: the whole point of Static Local Tags was to allow fast tag-to-UL resolution. 2) Discard the entire Local Set containing the problematic Static Local Tag. 3) Discard just the effected Element – this could possibly lead to a misleading dump output...

In any case it might still be useful to output some sort of notification (possibly a Warning?) when a problematic Local Tag is found.

palemieux commented 9 years ago

Option 2) implemented for now