1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-03 01:31:53 +02:00

Factor and fix locking

This commit is contained in:
Rémi Denis-Courmont 2009-03-06 18:14:36 +02:00
parent f18966f182
commit bc73c16c1b

View File

@ -81,23 +81,17 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
p_item = playlist_ItemGetByInputId( PL, i_id,
PL->p_root_category );
if( !p_item )
{
if( p_item )
playlist_Control( PL, PLAYLIST_VIEWPLAY, pl_Locked,
PL->p_root_category, p_item );
else
RAISEVOID( "Unable to find item" );
if( did_lock == 1 )
{
playlist_Unlock( PL );
playlist_mark_locked( p_instance, 0 );
}
RAISEVOID( "Unable to find item" );
}
playlist_Control( PL, PLAYLIST_VIEWPLAY, pl_Locked,
PL->p_root_category, p_item );
if( did_lock == 1 )
{
playlist_Lock( PL );
playlist_mark_locked( p_instance, 0 );
}
}
else
{