Index: /trunk/theora/lib/dec/decapiwrapper.c =================================================================== --- /trunk/theora/lib/dec/decapiwrapper.c (revision 14385) +++ /trunk/theora/lib/dec/decapiwrapper.c (revision 15144) @@ -168,10 +168,13 @@ ogg_int64_t gp; int ret; + + if(!_td || !_td->i || !_td->i->codec_setup)return OC_FAULT; api=(th_api_wrapper *)_td->i->codec_setup; + if(!api || !api->decode)return OC_FAULT; ret=th_decode_packetin(api->decode,_op,&gp); #ifdef _TH_DEBUG_ dframe++; -#endif +#endif if(ret<0)return OC_BADPACKET; @@ -185,5 +188,7 @@ int ret; + if(!_td || !_td->i || !_td->i->codec_setup)return OC_FAULT; api=(th_api_wrapper *)_td->i->codec_setup; + if(!api || !api->decode)return OC_FAULT; ret=th_decode_ycbcr_out(api->decode,buf); if(ret>=0){