MediaArea / MediaInfoLib

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://mediaarea.net/MediaInfo
BSD 2-Clause "Simplified" License
620 stars 170 forks source link

Matroska elements named incorrectly if at the wrong level #232

Open dericed opened 7 years ago

dericed commented 7 years ago

In this MKV file, the Segment is 0 sized and thus the subsequent elements are neighboring Segment rather than within it. So, for example, Void is reported as '6C' instead of 'Void'

<block offset="36" name="6C" size="4099">
        <block offset="36" name="Header" size="3">
          <data offset="36" name="Name">108</data>
          <data offset="37" name="Size">4096</data>
        </block>
        <data offset="39" name="Unknown">(4096 bytes)</data>
      </block>
JeromeMartinez commented 7 years ago

For the moment, I limit Void and CRC-32 to all 1+ levels. Should I accept Void and CRC-32 to all levels including level 0? reading "Global elements (used everywhere in the format)", I would say yes but I want to be sure before I change the code.