[NUT-devel] vorbis global 3 to 1 header mess

Michael Niedermayer michaelni at gmx.at
Tue Jul 18 23:10:10 CEST 2006


Hi

ive looked at the vorbis spec and it seems like its trivial to split the
3 header packets if they are simply blindly concatenated
the first packet has fixed length

the comment header looks like:

  1) [vendor_length] = read an unsigned integer of 32 bits
  2) [vendor_string] = read a UTF-8 vector as [vendor_length] octets
  3) [user_comment_list_length] = read an unsigned integer of 32 bits
  4) iterate [user_comment_list_length] times {
       5) [length] = read an unsigned integer of 32 bits
       6) this iteration's user comment = read a UTF-8 vector as [length] octets
     }
  7) [framing_bit] = read a single bit as boolean
  8) if ( [framing_bit] unset or end-of-packet ) then ERROR

an they all have a "vorbis" in front of them ...

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is



More information about the NUT-devel mailing list