]> git.sesse.net Git - vlc/commitdiff
logo filter: fail early if the logo hasn't been specified (rather than segfaulting)
authorRafaël Carré <funman@videolan.org>
Fri, 12 Oct 2007 18:32:39 +0000 (18:32 +0000)
committerRafaël Carré <funman@videolan.org>
Fri, 12 Oct 2007 18:32:39 +0000 (18:32 +0000)
modules/video_filter/logo.c

index 8147d1638014ff9983f1fde2402041da28307211..c3a3688c8b5cb79d85dff4e0ae6815a738803b5a 100644 (file)
@@ -322,13 +322,6 @@ static int Create( vlc_object_t *p_this )
         return VLC_ENOMEM;
     }
 
-    p_vout->pf_init = Init;
-    p_vout->pf_end = End;
-    p_vout->pf_manage = NULL;
-    p_vout->pf_render = Render;
-    p_vout->pf_display = NULL;
-    p_vout->pf_control = Control;
-
     config_ChainParse( p_vout, CFG_PREFIX, ppsz_filter_options,
                        p_vout->p_cfg );
 
@@ -337,9 +330,16 @@ static int Create( vlc_object_t *p_this )
     if( !p_logo_list->psz_filename || !*p_logo_list->psz_filename )
     {
         msg_Err( p_vout, "logo file not specified" );
-        return 0;
+        return VLC_EGENERIC;
     }
 
+    p_vout->pf_init = Init;
+    p_vout->pf_end = End;
+    p_vout->pf_manage = NULL;
+    p_vout->pf_render = Render;
+    p_vout->pf_display = NULL;
+    p_vout->pf_control = Control;
+
     p_sys->pos = var_CreateGetIntegerCommand( p_vout, "logo-position" );
     p_sys->posx = var_CreateGetIntegerCommand( p_vout, "logo-x" );
     p_sys->posy = var_CreateGetIntegerCommand( p_vout, "logo-y" );