[Vorbis-dev] Initializing vorbis using ov_open_callbacks fail with OV_ENOTVORBIS. But why?

Ralph Giles giles at xiph.org
Wed Jan 6 13:10:44 PST 2010


2010/1/6 Steven Mai <mai at graphics.cs.uni-sb.de>:

> next step:
> the idea was now to init vorbis using ov_open_callbacks, but this
> function failed with OV_ENOTVORBIS, when reading the first portion of data
> (callback function reads new data)

You don't say what data you're feeding libvorbisfile through the
callbacks. It expects it to be Ogg encapsulated, so are you packing
the vorbis packets back into a new sequence of pages through another
ogg_stream_state? Passing a copy of the same data you're demuxing
yourself?

The vorbisfile library is designed to play streams directly, doing its
own demuxing. You're better off feeding you demuxed packets to
libvorbis directly. See
http://svn.xiph.org/trunk/vorbis/examples/decoder_example.c for an
example of the call sequence for this.

HTH,
 -r


More information about the Vorbis-dev mailing list