[vlc-devel] commit: macosx: Don't take the playlist lock blindly, where there is no use for it. (Pierre d'Herbemont )
git version control
git at videolan.org
Tue Jul 8 22:22:38 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Jul 8 22:24:51 2008 +0200| [75975b302058d9c6c81e237fed539ef07e3d165f]
macosx: Don't take the playlist lock blindly, where there is no use for it.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75975b302058d9c6c81e237fed539ef07e3d165f
---
modules/gui/macosx/controls.m | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index b580066..e1629da 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 );
More information about the vlc-devel
mailing list