[ogg-dev] packets and OGG pages

Ralph Giles giles at xiph.org
Thu Mar 15 10:07:13 PDT 2007

On Thu, Mar 15, 2007 at 02:10:54PM +0000, Mathias Kunter wrote:

> I thought padding of the first packet in an ogg stream is forbidden: http://xiph.org/vorbis/doc/Vorbis_I_spec.html#vorbis-spec-codec says
> "An
> end-of-packet condition during decoding the first or third header
> packet renders the stream undecodable."
> Or does the end-of-packet condition only refers to packets which actually should be greater than the lacing values indicate (in other words, truncated and therefore corrupted packets, at least when speaking about the header packets)?

Yeah, "end-of-packet condition" means the packet parser ran out of bytes 
to read, i.e. the packet is shorter than the spec says it should be. 
Longer is generally ok, I think.

(As a bit of trivia, vorbis *data* packets are allowed to be short, 
handling truncated data gracefully is part of the spec.)

> As soon as I've finished implementing a working vorbis comments .NET library (which I want to do until the end of March), I can offer to write such specs. Maybe thats a good idea since I can write these specs from the "developer without ogg knowledge view". You could (and should) check the specs for correctitude afterwards, of course. Let me know if you're interested in.

That would be great! We always need help improving our documentation.


More information about the ogg-dev mailing list