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

Rich Felker dalias at aerifal.cx
Wed Jul 19 17:26:47 CEST 2006


On Wed, Jul 19, 2006 at 12:36:27PM +0200, Luca Barbato wrote:
> Michael Niedermayer wrote:
> > 
> > how to parse all the vorbis header variants:
> > 
> > 1) search for the 1st occurance of 01,'v','o','r','b','i','s'
> >    the found match and the following 23 bytes are the 1st header packet
> > 2) search for the 1st occurance of 03,'v','o','r','b','i','s' after here
> >   3) read an unsigned integer of 32 bits and skip that many bytes
> >   4) [user_comment_list_length] = read an unsigned integer of 32 bits
> >   5) iterate [user_comment_list_length] times {
> >        6) read an unsigned integer of 32 bits and skip that many bytes
> >      }
> >   7) skip 1 byte
> > 8) the match in 2) and what follows until here is the 2nd header packet
> > 9) search for the 1st occurance of 05,'v','o','r','b','i','s' after here
> >    the matching part and what follows is the 3rd header packet
> > 
> > if there are no objections then ill propose this on vorbis-dev
> > spelling fixes and other suggestions welcome
> > 
> > [...]
> 
> Looks ok.

Needs to specify endianness for the 'unsigned integer of 32 bits'
unless that's already clear from something else.. Otherwise looks
good!

Rich




More information about the NUT-devel mailing list