[vorbis-dev] lacing values clarifications

Beni Cherniavsky cben at techunix.technion.ac.il
Mon Jun 30 03:44:10 PDT 2003



Scott Wheeler wrote on 2003-06-29:

> There seem to be a couple of inconcistanies in the Ogg spec as regards to
> lacing values:
>
> *) "The raw packet is logicaly divided into [n] 255 byte segments and a last
> fractional segment of < 255 bytes."  However, in the wild, I've found an
> example where the first lacing value (in this case out of 13) is less than
> 255 (190 in the example I'm looking at).
>
Than you have a packet of length 190 and the following lacing values
belong already to the next packet - by defninition.

> *) "Note that a lacing value of 255 implies that a second lacing values
> follows [...] A packet of 255 bytes is terminated by a lacing value of 0."
> Is this value of 0 included in the "page_segments" value in the case that it
> occurs?  i.e. is it safe to assume that the number of lacing values in the
> header will be equal to the number of values in the segment_table?  Given the
> above, scanning for a value of < 255 doesn't seem to be safe.
>
It is safe as a way to detect an end of packet but not the end of the
page.  There might be more than one packet per page and a single
packet can be split accross many pages.


-- 
Beni Cherniavsky <cben at tx.technion.ac.il>

"Reading the documentation I felt like a kid in a toy shop."
 -- Phil Thompson on Python's standard library
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis-dev mailing list