Commit bc73c16c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Factor and fix locking

parent f18966f1
...@@ -81,21 +81,15 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id, ...@@ -81,21 +81,15 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
p_item = playlist_ItemGetByInputId( PL, i_id, p_item = playlist_ItemGetByInputId( PL, i_id,
PL->p_root_category ); PL->p_root_category );
if( !p_item ) if( p_item )
{ playlist_Control( PL, PLAYLIST_VIEWPLAY, pl_Locked,
if( did_lock == 1 ) PL->p_root_category, p_item );
{ else
playlist_Unlock( PL );
playlist_mark_locked( p_instance, 0 );
}
RAISEVOID( "Unable to find item" ); RAISEVOID( "Unable to find item" );
}
playlist_Control( PL, PLAYLIST_VIEWPLAY, pl_Locked,
PL->p_root_category, p_item );
if( did_lock == 1 ) if( did_lock == 1 )
{ {
playlist_Lock( PL ); playlist_Unlock( PL );
playlist_mark_locked( p_instance, 0 ); playlist_mark_locked( p_instance, 0 );
} }
} }
......
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