Ribamar Santarosa de Sousa
2007-Oct-02 13:18 UTC
[theora] testing if an ogg_stream_state was initiated.
Hello, Does anybody know how to test if an ogg_stream_state was initiated by ogg_stream_init() ? Or is something like keeping another structure/variable and set it when I call ogg_stream_init() probably the only way to get that information? Thanks, Ribamar
On Tue, Oct 02, 2007 at 08:06:52PM +0000, Ribamar Santarosa de Sousa wrote:> Does anybody know how to test if an ogg_stream_state was initiated by > ogg_stream_init() ? Or is something like keeping another > structure/variable and set it when I call ogg_stream_init() probably > the only way to get that information?No general way, no. If you're using a custom allocator, you might for example be able to ask it if the pointers point to allocated blocks, etc. But like most objects in C, you have to keep track of its lifetime yourself. -r