[theora-dev] Bug in src/player_example.c

Jay Cornwall jay at evilrealms.net
Fri Feb 6 11:38:33 PST 2004



Hi

I've just started development on a streaming TV player using Theora as a real 
time encoder.

The player currently uses the majority of code in src/player_example.c. I 
discovered a bug which was preventing the player from working correctly, but 
which only showed up in my player; it didn't seem to affect the original 
player_example.

I've now found the cause, which is indeed a bug in either player_example.c or 
libtheora itself. The example player declares a theora_state structure:

theora_state     td;

Assumptions in libtheora assume that the element 'internal_encoder' (and maybe 
others) is initialised to NULL. This declaration doesn't guarantee that 
condition and this turned out to be the cause of problems I was experiencing 
in my player.

A simple memset() did the trick; not the tidiest of solutions but I couldn't 
use theora_clear() from libtheora because this makes NULLness assumptions on 
the structure as well. Maybe a modification to theora_decode_init() to clear 
the appropriate fields?


-- 
Cheers,
Jay

http://www.evilrealms.net/ - Systems Administrator & Developer
http://www.imperial.ac.uk/ - 3rd year CS student
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Theora-dev mailing list