]> git.sesse.net Git - vlc/commitdiff
vlc_object_kill: remove the libvlc-specific hack
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 22 Jun 2008 18:01:17 +0000 (21:01 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 22 Jun 2008 18:01:17 +0000 (21:01 +0300)
It was causing deadlocks (due to misordering of structure_lock and
object locks). Besides, this hack should not be needed now that we have
libvlc_wait(), and that libvlc_release() explicitly calls
vlc_object_kill as needed.

src/misc/objects.c

index 325c55712cb00ee6c36009259a00f95543e56864..8a8e6d23e0a53ae10c68f614da9af56ef4b5316e 100644 (file)
@@ -625,18 +625,6 @@ void __vlc_object_kill( vlc_object_t *p_this )
 
     vlc_object_signal_unlocked( p_this );
     vlc_object_unlock( p_this );
-
-    if (p_this->i_object_type == VLC_OBJECT_LIBVLC)
-    {
-        /* Do not use vlc_list_children() here! We don't want to yield/release
-         * all the children of LibVLC (-> dead lock). This is a hack anyway:
-         * LibVLC should kill its children by itself as it sees fit, as any
-         * other object. */
-        vlc_mutex_lock (&structure_lock);
-        for (int i = 0; i < priv->i_children; i++)
-            vlc_object_kill (priv->pp_children[i]);
-        vlc_mutex_unlock (&structure_lock);
-    }
 }