Commit 0bd6fe5f authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: added missing playlist locks

parent 5568c88e
...@@ -1544,7 +1544,11 @@ static void * manage_cleanup( void * args ) ...@@ -1544,7 +1544,11 @@ static void * manage_cleanup( void * args )
/* update our info-panel to reflect the new item, if we don't show /* update our info-panel to reflect the new item, if we don't show
* the playlist or the selection is empty */ * the playlist or the selection is empty */
if( [self isPlaylistCollapsed] == YES ) if( [self isPlaylistCollapsed] == YES )
{
PL_LOCK;
[[self getInfo] updatePanelWithItem: playlist_CurrentPlayingItem( p_playlist )->p_input]; [[self getInfo] updatePanelWithItem: playlist_CurrentPlayingItem( p_playlist )->p_input];
PL_UNLOCK;
}
/* seekable streams */ /* seekable streams */
b_seekable = var_GetBool( p_input, "can-seek" ); b_seekable = var_GetBool( p_input, "can-seek" );
...@@ -1836,11 +1840,13 @@ end: ...@@ -1836,11 +1840,13 @@ end:
if( p_input && vlc_object_alive (p_input) ) if( p_input && vlc_object_alive (p_input) )
{ {
NSString *o_temp; NSString *o_temp;
PL_LOCK;
playlist_item_t * p_item = playlist_CurrentPlayingItem( p_playlist ); playlist_item_t * p_item = playlist_CurrentPlayingItem( p_playlist );
if( input_item_GetNowPlaying( p_item->p_input ) ) if( input_item_GetNowPlaying( p_item->p_input ) )
o_temp = [NSString stringWithUTF8String:input_item_GetNowPlaying( p_item->p_input )]; o_temp = [NSString stringWithUTF8String:input_item_GetNowPlaying( p_item->p_input )];
else else
o_temp = [NSString stringWithUTF8String:p_item->p_input->psz_name]; o_temp = [NSString stringWithUTF8String:p_item->p_input->psz_name];
PL_UNLOCK;
[self setScrollField: o_temp stopAfter:-1]; [self setScrollField: o_temp stopAfter:-1];
[[[self getControls] getFSPanel] setStreamTitle: o_temp]; [[[self getControls] getFSPanel] setStreamTitle: o_temp];
vlc_object_release( p_input ); vlc_object_release( p_input );
......
...@@ -573,7 +573,9 @@ ...@@ -573,7 +573,9 @@
playlist_item_t *p_item, *p_temp_item; playlist_item_t *p_item, *p_temp_item;
NSMutableArray *o_array = [NSMutableArray array]; NSMutableArray *o_array = [NSMutableArray array];
PL_LOCK;
p_item = playlist_CurrentPlayingItem( p_playlist ); p_item = playlist_CurrentPlayingItem( p_playlist );
PL_UNLOCK;
if( p_item == NULL ) if( p_item == NULL )
{ {
pl_Release( VLCIntf ); pl_Release( VLCIntf );
...@@ -1416,8 +1418,10 @@ ...@@ -1416,8 +1418,10 @@
id o_playing_item; id o_playing_item;
PL_LOCK;
o_playing_item = [o_outline_dict objectForKey: o_playing_item = [o_outline_dict objectForKey:
[NSString stringWithFormat:@"%p", playlist_CurrentPlayingItem( p_playlist )]]; [NSString stringWithFormat:@"%p", playlist_CurrentPlayingItem( p_playlist )]];
PL_UNLOCK;
if( [self isItem: [o_playing_item pointerValue] inNode: if( [self isItem: [o_playing_item pointerValue] inNode:
[item pointerValue] checkItemExistence: YES] [item pointerValue] checkItemExistence: YES]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment