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

Steven Mai mai at graphics.cs.uni-sb.de
Wed Jan 6 11:50:30 PST 2010


Dear members,

since two weeks I am stuck, trying to demux a physical ogg stream 
(theora and vorbis) and play the audio part using vorbisfile.
I hope that one of you can give me a hint or point me to additional 
documentation.

I used ogg.h and vorbisfile.h.

The way so far:
- initializing an ogg_sync_state
- inserting data to sync_state using ogg_sync_buffer
- when whole page found (ogg_sync_pageseek(&sync, &page) > 0) I 
initialize a ogg_stream_state and add page using ogg_stream_packetin.
  (in the case the first packet is vorbis - ogg_stream_packetout and 
check for first some bytes)
- next pages with same serial number are handled equivalently:
  stored in ogg_stream_state using ogg_stream_packetin to add them to 
ogg_stream_state and
  using ogg_stream_pageout to get ogg encapsulated vorbis pages.

..I hope up to this point no logical error..

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)

1.do you know what could cause the error?
2.does vorbis need a minimal ammout of data to initialize?
3.do I forgot to initialize some comment struct in advance?

thanks for any hint

Steven



More information about the Vorbis-dev mailing list