Commit 03071b8a authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx playlist: Move one of the lock to avoid a "lock in locked-state" issue.

Add a few more lockings around other playlist data as well. We really need to redo all this stuff.
parent b1659510
......@@ -236,6 +236,7 @@
int i_return = 0;
playlist_t *p_playlist = pl_Hold( VLCIntf );
PL_LOCK;
if( item == nil )
{
/* root object */
......@@ -250,6 +251,7 @@
if( p_item )
i_return = p_item->i_children;
}
PL_UNLOCK;
pl_Release( VLCIntf );
return (i_return >= 0);
......@@ -642,6 +644,7 @@
[o_array insertObject: [NSValue valueWithPointer: p_temp_item] atIndex: 0];
p_temp_item = p_temp_item->p_parent;
}
PL_UNLOCK;
for( j = 0; j < [o_array count] - 1; j++ )
{
......@@ -652,10 +655,8 @@
{
[o_outline_view expandItem: o_item];
}
}
PL_UNLOCK;
pl_Release( VLCIntf );
}
......@@ -849,12 +850,12 @@
p_item = [[o_outline_view itemAtRow:[o_outline_view selectedRow]] pointerValue];
PL_LOCK;
if( p_item )
{
if( p_item->i_children == -1 )
{
p_node = p_item->p_parent;
}
else
{
......@@ -868,8 +869,9 @@
p_item = NULL;
}
}
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Unlocked, p_node, p_item );
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, p_node, p_item );
}
PL_UNLOCK;
pl_Release( p_intf );
}
......
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