From 75975b302058d9c6c81e237fed539ef07e3d165f Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Tue, 8 Jul 2008 22:24:51 +0200 Subject: [PATCH] macosx: Don't take the playlist lock blindly, where there is no use for it. --- modules/gui/macosx/controls.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m index b58006642c..e1629da221 100644 --- a/modules/gui/macosx/controls.m +++ b/modules/gui/macosx/controls.m @@ -888,8 +888,6 @@ intf_thread_t * p_intf = VLCIntf; playlist_t * p_playlist = pl_Yield( p_intf ); - vlc_object_lock( p_playlist ); - #define p_input p_playlist->p_input if( [[o_mi title] isEqualToString: _NS("Faster")] || @@ -916,7 +914,9 @@ [[o_mi title] isEqualToString: _NS("Next")] ) { /** \todo fix i_size use */ + PL_LOCK; bEnabled = p_playlist->items.i_size > 1; + PL_UNLOCK; } else if( [[o_mi title] isEqualToString: _NS("Random")] ) { @@ -999,7 +999,6 @@ [o_main setupMenus]; /* Make sure video menu is up to date */ } - vlc_object_unlock( p_playlist ); vlc_object_release( p_playlist ); return( bEnabled ); -- 2.39.2