Commit a85849f9 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Mac OS X gui: Fix dead lock when exiting. As a side effect VLC.app exit is really fast.

parent 5163be8e
......@@ -25,10 +25,10 @@
<array/>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>2730</integer>
<integer>29</integer>
<integer>2769</integer>
<integer>21</integer>
<integer>2730</integer>
</array>
<key>IBSystem Version</key>
<string>8L2127</string>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -307,7 +307,7 @@ struct intf_sys_t
- (id)getMainIntfPgbar;
- (id)getControllerWindow;
- (id)getVoutMenu;
- (void)terminate;
- (void)applicationWillTerminate:(NSNotification *)notification;
- (NSString *)localizedString:(char *)psz;
- (char *)delocalizeString:(NSString *)psz;
- (NSString *)wrapString: (NSString *)o_in_string toWidth: (int)i_width;
......
......@@ -114,7 +114,6 @@ static void Run( intf_thread_t *p_intf )
[[VLCMain sharedInstance] setIntf: p_intf];
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
[NSApp run];
[[VLCMain sharedInstance] terminate];
}
int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
......@@ -1530,7 +1529,7 @@ static VLCMain *_o_sharedMainInstance = nil;
#undef p_input
}
- (void)terminate
- (void)applicationWillTerminate:(NSNotification *)notification
{
playlist_t * p_playlist;
vout_thread_t * p_vout;
......@@ -1549,19 +1548,6 @@ static VLCMain *_o_sharedMainInstance = nil;
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
/* FIXME - Wait here until all vouts are terminated because
libvlc's VLC_CleanUp destroys interfaces before vouts, which isn't
good on OS X. We definitly need a cleaner way to handle this,
but this may hopefully be good enough for now.
-- titer 2003/11/22 */
while( ( p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE ) ) )
{
vlc_object_release( p_vout );
msleep( 100000 );
}
msleep( 500000 );
/* make sure that the current volume is saved */
config_PutInt( p_intf->p_libvlc, "volume", i_lastShownVolume );
returnedValue = config_SaveConfigFile( p_intf->p_libvlc, "main" );
......
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