From 0bd6fe5f997142bfaa6f24244d966fd9d040faf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Wed, 18 Feb 2009 10:55:32 +0100 Subject: [PATCH] macosx: added missing playlist locks --- modules/gui/macosx/intf.m | 6 ++++++ modules/gui/macosx/playlist.m | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 2ac52a1859..9b6443647d 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -1544,7 +1544,11 @@ static void * manage_cleanup( void * args ) /* update our info-panel to reflect the new item, if we don't show * the playlist or the selection is empty */ if( [self isPlaylistCollapsed] == YES ) + { + PL_LOCK; [[self getInfo] updatePanelWithItem: playlist_CurrentPlayingItem( p_playlist )->p_input]; + PL_UNLOCK; + } /* seekable streams */ b_seekable = var_GetBool( p_input, "can-seek" ); @@ -1836,11 +1840,13 @@ end: if( p_input && vlc_object_alive (p_input) ) { NSString *o_temp; + PL_LOCK; playlist_item_t * p_item = playlist_CurrentPlayingItem( p_playlist ); if( input_item_GetNowPlaying( p_item->p_input ) ) o_temp = [NSString stringWithUTF8String:input_item_GetNowPlaying( p_item->p_input )]; else o_temp = [NSString stringWithUTF8String:p_item->p_input->psz_name]; + PL_UNLOCK; [self setScrollField: o_temp stopAfter:-1]; [[[self getControls] getFSPanel] setStreamTitle: o_temp]; vlc_object_release( p_input ); diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 14018c6948..334edfed86 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -573,7 +573,9 @@ playlist_item_t *p_item, *p_temp_item; NSMutableArray *o_array = [NSMutableArray array]; + PL_LOCK; p_item = playlist_CurrentPlayingItem( p_playlist ); + PL_UNLOCK; if( p_item == NULL ) { pl_Release( VLCIntf ); @@ -1416,8 +1418,10 @@ id o_playing_item; + PL_LOCK; o_playing_item = [o_outline_dict objectForKey: [NSString stringWithFormat:@"%p", playlist_CurrentPlayingItem( p_playlist )]]; + PL_UNLOCK; if( [self isItem: [o_playing_item pointerValue] inNode: [item pointerValue] checkItemExistence: YES] -- 2.39.5