[theora-dev] ogg packets get lost
pbyrne at frontier.co.uk
Fri Jan 4 03:01:04 PST 2008
> However, I started the project and found some very strange behaviors:
> I stored some ogg_packet objects (which are created on the heap) in a list.
> When I make several calls to ogg_stream_pagein() and ogg_stream_packetout(),
> the packets are accidentally overwritten by some nonsense.
IANAGuru, but it sounds as though you are trying to 'keep' the ogg
packet pointer you get from ogg_stream_packetout(). This is not possible
- it is only a pointer to data inside the stream, and will most likely
be invalidated as soon as you add another page into the stream.
The code in player_example.c correctly handles packets before touching
the stream again.
This was certainly I problem I encountered getting a decoder working - I
hope this helps!
- Patrick Byrne
More information about the theora-dev