• Edward Hervey's avatar
    id3v2: re-fix handling of v2.4 extended headers · 6f5c9db1
    Edward Hervey authored and Tim-Philipp Müller's avatar Tim-Philipp Müller committed
    The various id3v2 specs handle the extended header sizes differently
    (because hey, it wouldn't be fun otherwise).
    http://id3.org/id3v2.3.0 states:
    "Where the 'Extended header size', currently 6 or 10 bytes, excludes
    http://id3.org/id3v2.4.0-structure states:
      Extended header size   4 * %0xxxxxxx
         Number of flag bytes       $01
         Extended Flags             $xx
       Where the 'Extended header size' is the size of the whole extended
       header, stored as a 32 bit synchsafe integer. An extended header can
       thus never have a size of fewer than six bytes.
    So in id3v2.4.0 it's the *whole* extended header size (a-la ISOBMFF
    atom), whereas in id3v2.3.0 it's the extended header size *excluding*
    those 4 initial bytes.
    And for other versions, god knows..
    Fixes regression introduced in commit da607005.