[vlc-commits] Fix .play(void) after .playlist.add();
Sergey Radionov
git at videolan.org
Fri Oct 5 17:27:09 CEST 2012
npapi-vlc | branch: master | Sergey Radionov <rsatom at gmail.com> | Fri Oct 5 17:26:38 2012 +0200| [23fe0695ab8df2d632fcd6eab614121ab408cc02] | committer: Jean-Baptiste Kempf
Fix .play(void) after .playlist.add();
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=23fe0695ab8df2d632fcd6eab614121ab408cc02
---
common/vlc_player.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/common/vlc_player.cpp b/common/vlc_player.cpp
index 619f13d..2b07155 100644
--- a/common/vlc_player.cpp
+++ b/common/vlc_player.cpp
@@ -167,8 +167,15 @@ void vlc_player::play()
if( !is_open() )
return;
- libvlc_media_list_player_play(_ml_p);
- on_player_action(pa_play);
+ if( 0 == items_count() )
+ return;
+ else if( -1 == current_item() ) {
+ play(0);
+ }
+ else {
+ libvlc_media_list_player_play(_ml_p);
+ on_player_action(pa_play);
+ }
}
bool vlc_player::play(unsigned int idx)
More information about the vlc-commits
mailing list