Commit 08a001aa authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix OSX misuses of vlc_list_*

parent e298f31f
...@@ -372,7 +372,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -372,7 +372,7 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
p_list = module_list_get( NULL ); p_list = module_list_get( NULL );
if( !p_item ||!p_list ) 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" ); NSLog( @"serious problem, item or list not found" );
return; return;
} }
......
...@@ -233,28 +233,11 @@ static void * MonitorLibVLCDeath( vlc_object_t * p_this ) ...@@ -233,28 +233,11 @@ static void * MonitorLibVLCDeath( vlc_object_t * p_this )
int canc = vlc_savecancel (); int canc = vlc_savecancel ();
vlc_object_lock( p_libvlc ); vlc_object_lock( p_libvlc );
while(vlc_object_alive( p_libvlc ) ) while( vlc_object_alive( p_libvlc ) )
{
if(p_intf->b_die)
{
vlc_object_unlock( p_libvlc );
return NULL;
}
vlc_object_wait( p_libvlc ); vlc_object_wait( p_libvlc );
}
vlc_object_unlock( p_libvlc ); vlc_object_unlock( p_libvlc );
/* Someone killed libvlc */ vlc_object_kill( p_intf ); /* Kill the stupid first thread interface */
/* 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_restorecancel (canc); vlc_restorecancel (canc);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment