[vlc-devel] commit: Fix OSX misuses of vlc_list_* ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 19 19:20:06 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Jan 19 20:19:47 2009 +0200| [08a001aa3f1a50f261fe4d3fa462f4a5189aea41] | committer: Rémi Denis-Courmont 

Fix OSX misuses of vlc_list_*

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

 modules/gui/macosx/simple_prefs.m |    2 +-
 src/interface/interface.c         |   21 ++-------------------
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 42ebc42..4146d44 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -372,7 +372,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
     p_list = module_list_get( NULL );
     if( !p_item ||!p_list )
     {
-        if( p_list ) vlc_list_release(p_list);
+        if( p_list ) module_list_free(p_list);
         NSLog( @"serious problem, item or list not found" );
         return;
     }
diff --git a/src/interface/interface.c b/src/interface/interface.c
index baa305a..6dc2382 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -233,28 +233,11 @@ static void * MonitorLibVLCDeath( vlc_object_t * p_this )
     int canc = vlc_savecancel ();
 
     vlc_object_lock( p_libvlc );
-    while(vlc_object_alive( p_libvlc ) )
-    {
-        if(p_intf->b_die)
-        {
-            vlc_object_unlock( p_libvlc );
-            return NULL;
-        }
+    while( vlc_object_alive( p_libvlc ) )
         vlc_object_wait( p_libvlc );
-    }
     vlc_object_unlock( p_libvlc );
 
-    /* Someone killed libvlc */
-
-    /* Make sure we kill all interface objects, especially
-     * those that are blocking libvlc (running on main thread) */
-    vlc_list_t * p_list = vlc_list_find( p_libvlc, VLC_OBJECT_INTF, FIND_CHILD );
-    for( int i = 0; i < p_list->i_count; i++ )
-    {
-        vlc_object_t * p_intf = p_list->p_values[i].p_object;
-        vlc_object_kill( p_intf );
-    }
-    vlc_list_release( p_list );
+    vlc_object_kill( p_intf ); /* Kill the stupid first thread interface */
     vlc_restorecancel (canc);
     return NULL;
 }




More information about the vlc-devel mailing list