Move the add/del_callback call (to be sure to have the needed ressources).
authorRémi Duraffort <ivoire@videolan.org>
Thu, 25 Jun 2009 10:11:54 +0000 (12:11 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 25 Jun 2009 10:14:12 +0000 (12:14 +0200)
modules/video_filter/deinterlace.c

index 0460fd9..1d1ddef 100644 (file)
@@ -388,12 +388,12 @@ static int Init( vout_thread_t *p_vout )
         return VLC_EGENERIC;
     }
 
-    var_AddCallback( p_vout, "deinterlace-mode", FilterCallback, NULL );
-
     vout_filter_AllocateDirectBuffers( p_vout, VOUT_MAX_PICTURES );
 
     vout_filter_AddChild( p_vout, p_vout->p_sys->p_vout, MouseEvent );
 
+    var_AddCallback( p_vout, "deinterlace-mode", FilterCallback, NULL );
+
     return VLC_SUCCESS;
 }
 
@@ -417,6 +417,8 @@ static void End( vout_thread_t *p_vout )
 {
     vout_sys_t *p_sys = p_vout->p_sys;
 
+    var_DelCallback( p_vout, "deinterlace-mode", FilterCallback, NULL );
+
     if( p_sys->p_vout )
     {
         vout_filter_DelChild( p_vout, p_sys->p_vout, MouseEvent );