[vlc-devel] commit: libvlc_playlist_play: remove exception ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Aug 9 17:37:21 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug  9 18:22:41 2009 +0300| [564122b4258ab0b11060f90a5109edb073cfa54c] | committer: Rémi Denis-Courmont 

libvlc_playlist_play: remove exception

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=564122b4258ab0b11060f90a5109edb073cfa54c
---

 include/vlc/deprecated.h |    2 +-
 src/control/playlist.c   |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
index 649545a..cbb382d 100644
--- a/include/vlc/deprecated.h
+++ b/include/vlc/deprecated.h
@@ -82,7 +82,7 @@ VLC_DEPRECATED_API libvlc_drawable_t
  */
 
 /**
- * Start playing.
+ * Start playing (if there is any item in the playlist).
  *
  * Additionnal playlist item options can be specified for addition to the
  * item before it is played.
diff --git a/src/control/playlist.c b/src/control/playlist.c
index d71e61f..a2ccdc8 100644
--- a/src/control/playlist.c
+++ b/src/control/playlist.c
@@ -42,6 +42,7 @@ void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id,
     VLC_UNUSED(i_id); VLC_UNUSED(i_options); VLC_UNUSED(ppsz_options);
 
     assert( pl );
-    if( pl->items.i_size == 0 ) RAISEVOID( "Empty playlist" );
+    if( pl->items.i_size == 0 )
+        return;
     playlist_Control( pl, PLAYLIST_PLAY, false );
 }




More information about the vlc-devel mailing list