p_avc = p_avctx ? p_avctx->av_class : 0;
+#define cln p_avc->class_name
/* Make sure we can get p_this back */
- if( !p_avctx || !p_avc || !p_avc->class_name ||
- strcmp( p_avc->class_name, "AVCodecContext" ) )
+ if( !p_avctx || !p_avc || !cln ||
+ cln[0]!='A' || cln[1]!='V' || cln[2]!='C' || cln[3]!='o' ||
+ cln[4]!='d' || cln[5]!='e' || cln[6]!='c' )
{
if( i_level == AV_LOG_ERROR ) vfprintf( stderr, psz_format, va );
return;
}
+#undef cln
p_this = (vlc_object_t *)p_avctx->opaque;