diff libmpcodecs/dec_video.c @ 6785:12dcd0f85262

fixed possible 10l bug (vf not initialized yet)
author alex
date Thu, 25 Jul 2002 10:27:35 +0000
parents 5bf3ed8a17c4
children b16cb6cbff5a
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Thu Jul 25 03:37:28 2002 +0000
+++ b/libmpcodecs/dec_video.c	Thu Jul 25 10:27:35 2002 +0000
@@ -78,8 +78,12 @@
 {
     vf_instance_t* vf=sh_video->vfilter;
     
-    if (vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value) == CONTROL_TRUE)
-	return 1;
+    if (vf)
+    {
+	int ret =  vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value);
+	if (ret == CONTROL_TRUE)
+	    return(1);
+    }
     /* try software control */
     if(mpvdec) return mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER, item, (int *)value);
     return 0;