[Vorbis-dev] copying an ogg stream

Monty xiphmont at xiph.org
Tue Sep 21 13:15:47 PDT 2004

On Thu, Sep 23, 2004 at 12:31:01AM +0800, illiminable wrote:
> ----- Original Message ----- 
> From: "Christoph Rupp" <crupp at umc-web.de>
> To: "illiminable" <ogg at illiminable.com>
> Cc: <vorbis-dev at xiph.org>
> Sent: Thursday, September 23, 2004 12:26 AM
> Subject: Re: [Vorbis-dev] copying an ogg stream
> >Hi Zen,
> >
> >illiminable wrote:
> >>Why is it that you break the packets out of the page ?
> >
> >to set the e_o_s flag. i want to be able to cut off the file in the 
> >middle...
> >
> Can't you do that directly on the page ? Or does it need to be packet 
> accurate ?

Breaking out packets is neither wrong nor complicated.  His appraoch
is conceptually clean and easy to manage.  I see no reason to
discourage it.

> Even if it does need to be packet accurate... only the last page need be 
> broken up.
> If you only need page level accuracy... you can just add an empty page with 
> the EOS flag set and the granule pos of the previous page... setting the 
> previous pages granule pos to -1.

That would be pushing the bounds of what's legal under the spec.  I
don;t think the spec comes right out and says that intentionally
neglecting granulepos entries where there should be a valid entry is
illegal, but one could argue for the point.  Of course, software had
better behave either way.


More information about the Vorbis-dev mailing list