[vlc-devel] commit: macosx: Yet an other locking typo. (Pierre d'Herbemont )

git version control git at videolan.org
Tue Jul 8 22:57:41 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Jul  8 22:59:56 2008 +0200| [45fee8edc633c8305b282c653b89ed600fab0a7a]

macosx: Yet an other locking typo.

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

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

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 9be1f6b..22d81f8 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -970,6 +970,7 @@
     int i_item;
     playlist_t * p_playlist = pl_Yield( VLCIntf );
 
+    PL_LOCK;
     for( i_item = 0; i_item < (int)[o_array count]; i_item++ )
     {
         input_item_t *p_input;
@@ -985,9 +986,10 @@
 
         /* Add the item */
         /* FIXME: playlist_AddInput() can fail */
+        
         playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT,
              i_position == -1 ? PLAYLIST_END : i_position + i_item, true,
-         false );
+         true );
 
         if( i_item == 0 && !b_enqueue )
         {
@@ -997,6 +999,8 @@
         }
         vlc_gc_decref( p_input );
     }
+    PL_UNLOCK;
+
     [self playlistUpdated];
     vlc_object_release( p_playlist );
 }




More information about the vlc-devel mailing list