2009/6/18 Timur Elzhov <elzhov at gmail.com>:> 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
> calling
>
> 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?
If you are just concatenating ("chaining") files together you
don't
need to reset.
Try ogg_stream_clear(), as in vorbis/examples/decoder_example.c.
cheers,
Conrad.