[vorbis-dev] lacing values clarifications

Michael Smith msmith at xiph.org
Mon Jun 30 19:23:02 PDT 2003



On Sunday 29 June 2003 12:14, Scott Wheeler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I thought I would separate this out into a separate mail since it's not
> comment specific stuff --
>
> 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).

That indicates a 190 byte packet (plus whatever preceeded it in a previous 
page, if it's a continued page), followed by another packet. This isn't 
ambiguous, there's no other way to interpret this. So either you've 
misinterpreted what this page was, or you just have a horribly, horribly 
corrupt ogg file. (note that libvorbis/libvorbisfile is quite permissive in 
some cases, and will sometimes accept out-of-spec files. ogginfo (the cvs 
version is better for this) will give you a pretty thorough listing of 
ogg-level errors (and some vorbis-level errors, primarily in the comment 
header) if you run it on a file).

>
> *) "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.
>

Yes, the zero is one of these 'lacing values', so it's included in the 
page_segments value.

<p>Mike

--- >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