]> git.sesse.net Git - vlc/commitdiff
input: kill all the children [add evil laughters here]
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 15 Jun 2008 16:32:33 +0000 (19:32 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 15 Jun 2008 16:32:33 +0000 (19:32 +0300)
No need for vlc_object_find()

src/input/input.c

index c954bb5e13f32438c8a6078e7bb744d0d4766368..3b1849de9ec13f40a48383becc6dde41397c4fa5 100644 (file)
@@ -449,28 +449,10 @@ void input_StopThread( input_thread_t *p_input )
     /* We cannot touch p_input fields directly (we come from another thread),
      * so use the vlc_object_find way, it's perfectly safe */
 
-    /* Set die for all access */
-    p_list = vlc_list_find( p_input, VLC_OBJECT_ACCESS, FIND_CHILD );
+    /* Set die for all access, stream, demux, etc */
+    p_list = vlc_list_children( p_input );
     for( i = 0; i < p_list->i_count; i++ )
-    {
-        vlc_object_kill( p_list->p_values[i].p_object );
-    }
-    vlc_list_release( p_list );
-
-    /* Set die for all stream */
-    p_list = vlc_list_find( p_input, VLC_OBJECT_STREAM, FIND_CHILD );
-    for( i = 0; i < p_list->i_count; i++ )
-    {
         vlc_object_kill( p_list->p_values[i].p_object );
-    }
-    vlc_list_release( p_list );
-
-    /* Set die for all demux */
-    p_list = vlc_list_find( p_input, VLC_OBJECT_DEMUX, FIND_CHILD );
-    for( i = 0; i < p_list->i_count; i++ )
-    {
-        vlc_object_kill( p_list->p_values[i].p_object );
-    }
     vlc_list_release( p_list );
 
     input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL );