[vlc-devel] commit: Factor and fix locking ( Rémi Denis-Courmont )
git version control
git at videolan.org
Fri Mar 6 17:15:51 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 6 18:14:36 2009 +0200| [bc73c16c1b53129dd2f402207856f2b457f4acb5] | committer: Rémi Denis-Courmont
Factor and fix locking
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc73c16c1b53129dd2f402207856f2b457f4acb5
---
src/control/playlist.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/control/playlist.c b/src/control/playlist.c
index 794c137..4f354ad 100644
--- a/src/control/playlist.c
+++ b/src/control/playlist.c
@@ -81,21 +81,15 @@ 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( did_lock == 1 )
- {
- playlist_Unlock( PL );
- playlist_mark_locked( p_instance, 0 );
- }
+ if( p_item )
+ playlist_Control( PL, PLAYLIST_VIEWPLAY, pl_Locked,
+ PL->p_root_category, p_item );
+ else
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_Unlock( PL );
playlist_mark_locked( p_instance, 0 );
}
}
More information about the vlc-devel
mailing list