]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/transform.c
Fixed filters implemented as vout (Init/End can be called multiple times
[vlc] / modules / video_filter / transform.c
index dc880d2efc4d26464e9084986002ca1f13b81ce1..a8eee2c9b0ce0c21f58816effdad965dc7e44ab8 100644 (file)
@@ -276,12 +276,18 @@ static void End( vout_thread_t *p_vout )
 {
     int i_index;
 
+    DEL_PARENT_CALLBACKS( SendEventsToChild );
+
+    DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+
     /* Free the fake output buffers we allocated */
     for( i_index = I_OUTPUTPICTURES ; i_index ; )
     {
         i_index--;
         free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
     }
+
+    vout_Destroy( p_vout->p_sys->p_vout );
 }
 
 /*****************************************************************************
@@ -293,15 +299,6 @@ static void Destroy( vlc_object_t *p_this )
 {
     vout_thread_t *p_vout = (vout_thread_t *)p_this;
 
-    if( p_vout->p_sys->p_vout )
-    {
-        DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
-        vlc_object_detach( p_vout->p_sys->p_vout );
-        vlc_object_release( p_vout->p_sys->p_vout );
-    }
-
-    DEL_PARENT_CALLBACKS( SendEventsToChild );
-
     free( p_vout->p_sys );
 }