From 08a001aa3f1a50f261fe4d3fa462f4a5189aea41 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 19 Jan 2009 20:19:47 +0200 Subject: [PATCH] Fix OSX misuses of vlc_list_* --- 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 42ebc42c24..4146d44dfe 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 baa305a532..6dc2382c21 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; } -- 2.39.2