[vlc-devel] commit: macosx: We need the PL_LOCK here (May fix a race we have on startup ). (Pierre d'Herbemont )

git version control git at videolan.org
Mon Sep 15 23:36:13 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Mon Sep 15 23:38:25 2008 +0200| [74a2f7922a262f7a5a6d1323fceecad50c6e97b5] | committer: Pierre d'Herbemont 

macosx: We need the PL_LOCK here (May fix a race we have on startup).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74a2f7922a262f7a5a6d1323fceecad50c6e97b5
---

 modules/gui/macosx/playlist.m |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index f088863..9713b41 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -171,6 +171,7 @@
     NSValue *o_value;
     playlist_t * p_playlist = pl_Yield( VLCIntf );
 
+    PL_LOCK;
     if( item == nil )
     {
         /* root object */
@@ -182,7 +183,8 @@
     }
     if( p_item && index < p_item->i_children && index >= 0 )
         p_return = p_item->pp_children[index];
- 
+    PL_UNLOCK;
+
     vlc_object_release( p_playlist );
 
     o_value = [o_outline_dict objectForKey:[NSString stringWithFormat: @"%p", p_return]];




More information about the vlc-devel mailing list