[xiph-commits] r8987 - trunk/theora/lib

tterribe at motherfish-iii.xiph.org tterribe at motherfish-iii.xiph.org
Fri Feb 25 19:44:25 PST 2005


Author: tterribe
Date: 2005-02-25 19:44:24 -0800 (Fri, 25 Feb 2005)
New Revision: 8987

Modified:
   trunk/theora/lib/toplevel.c
Log:
Explictly null out our theora_state in theora_decode_init.
The structure was already nulled in theora_encode_init, but not in decode,
 which made theora_granule_time crash when it tried to access internal_encode
 to determine whether the state is for an encoder or a decoder.
Thanks to Nehal for the catch.


Modified: trunk/theora/lib/toplevel.c
===================================================================
--- trunk/theora/lib/toplevel.c	2005-02-26 03:38:17 UTC (rev 8986)
+++ trunk/theora/lib/toplevel.c	2005-02-26 03:44:24 UTC (rev 8987)
@@ -294,6 +294,7 @@
   codec_setup_info *ci;
 
   ci=(codec_setup_info *)c->codec_setup;
+  memset(th, 0, sizeof(*th));
   th->internal_decode=pbi=_ogg_calloc(1,sizeof(*pbi));
 
   InitPBInstance(pbi);



More information about the commits mailing list