[ogg-dev] ogg_stream_reset() question

Timur Elzhov elzhov at gmail.com
Thu Jun 18 05:38:19 PDT 2009

Hi Ogg experts!

My current work is catenating packets from several ogg files to the
one long stream, so I'd like to create stream once, and then reset it
just before reading codec headers from every new file. However, after

ogg_stream_reset_serialno(ogg_stream_state *os, int serialno),

bos page is not pushed in stream since it calls

ogg_stream_reset(ogg_stream_state *os),

which set os->pageno to -1, while ogg_stream_init(ogg_stream_state
*os, int serialno) sets it to 0. If I call ogg_stream_reset(), and the
explicitly set os->pageno = 0, no problem, the consequent pages are
pushed into stream.

So the question - why ogg_stream_reset() sets pageno to -1 instead to
zero, if it does not make stream ready to accept pages from new file?

Much thanks in advance!


More information about the ogg-dev mailing list