-----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). *) "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. Thanks again, - -Scott - -- The fact that an opinion has been widely held is no evidence whatever that it is not utterly absurd. - --Bertrand Russell -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+/kuKQu0ByfY5QTkRAq4FAJ9lc55PXchmRFepbBvnCWvMXpSoBQCgzSfM opB+PyS5m98+n1H1eco4gog=BDRq -----END PGP SIGNATURE----- <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Sunday, June 29, 2003, at 03:14 am, Scott Wheeler wrote:> *) "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 would imply the first packet in the page is of length 190. The comment header packet is often less that 255 bytes, so this is a common occurrence in the second page.> *) "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?Yes. (unless it's on the next page)> 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?As the spec says, this field is "[t]he number of segment entries to appear in the segment table". The zero termination is just a bit of redundency for error detection, of if you prefer an esthetic consistency. -r --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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@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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 01 July 2003 4:23, Michael Smith wrote:> 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.Ah, ok -- as was hinted at in a previous mail I was missing some of the fine points of packet / page definitions. It's all starting to make a bit more sense now. :-) Cheers, - -Scott - -- New Orleans food is as delicious as the less criminal forms of sin. --Mark Twain -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/AiDEQu0ByfY5QTkRAv1DAJ4qqDZf/C41O1Or5YqkCfjVLKW+MQCgumx+ 9tOJm8OyWEz1ZxatXMivBns=E2j2 -----END PGP SIGNATURE----- <p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.