[Vorbis-dev] copying an ogg stream

Segher Boessenkool segher at kernel.crashing.org
Fri Sep 24 18:28:35 PDT 2004

> This is incorrect. Only the header packets have a granulepos of -1, and
> pages that no packet ends on.

But libogg won't tell you the granulepos for any packet
but the last one in a page.  And it requires you to set
it correctly for every packet you write.  It's a pain.
I have a partial solution for Vorbis streams, but it doesn't
work in all cases yet (some vcut' streams still go wrong).

Either libogg should (on write) not require granulepos'
on any but the first packet in a stream, or it should
generate the pos for you on reads.  But this gets the
abstraction wrong; libogg shouldn't need to know about
any codec bitstream formats.

Maybe libvorbis could have a helper function for this?


More information about the Vorbis-dev mailing list