]> git.sesse.net Git - vlc/commitdiff
macosx: Don't take the playlist lock blindly, where there is no use for it.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 8 Jul 2008 20:24:51 +0000 (22:24 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 8 Jul 2008 20:24:51 +0000 (22:24 +0200)
modules/gui/macosx/controls.m

index b58006642ca96c0ced391a53c24123958a9576a4..e1629da2219b7fc108b422645303781bcf907780 100644 (file)
     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")] ||
              [[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")] )
     {
         [o_main setupMenus]; /* Make sure video menu is up to date */
     }
 
-    vlc_object_unlock( p_playlist );
     vlc_object_release( p_playlist );
 
     return( bEnabled );