[vlc-devel] commit: Kill LibVLC children without the libvlc lock ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 31 18:35:41 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat May 31 19:37:20 2008 +0300| [f9b646408f693e006d9df0afd3355374f0583d12]

Kill LibVLC children without the libvlc lock

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f9b646408f693e006d9df0afd3355374f0583d12
---

 src/misc/objects.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/misc/objects.c b/src/misc/objects.c
index 4830eda..b4f3a6d 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -621,12 +621,16 @@ void __vlc_object_kill( vlc_object_t *p_this )
         close (fd);
     }
 
-    if( p_this->i_object_type == VLC_OBJECT_LIBVLC )
-        for( int i = 0; i < internals->i_children ; i++ )
-            vlc_object_kill( internals->pp_children[i] );
-
     vlc_object_signal_unlocked( p_this );
     vlc_mutex_unlock( &p_this->object_lock );
+
+    if (p_this->i_object_type == VLC_OBJECT_LIBVLC)
+    {
+        vlc_list_t *children = vlc_list_children (p_this);
+        for (int i = 0; i < children->i_count; i++)
+            vlc_object_kill (children->p_values[i].p_object);
+        vlc_list_release (children);
+    }
 }
 
 




More information about the vlc-devel mailing list