[vlc-commits] playlist: use playlist_ViewPlay() instead of PLAYLIST_GO
Rémi Denis-Courmont
git at videolan.org
Sun May 14 18:39:46 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 14 18:10:14 2017 +0300| [3a0bee69420d8ae0387f7384239d4c765b09d7bb] | committer: Rémi Denis-Courmont
playlist: use playlist_ViewPlay() instead of PLAYLIST_GO
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a0bee69420d8ae0387f7384239d4c765b09d7bb
---
src/playlist/item.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 929e8275eb..6365169d65 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -483,8 +483,10 @@ int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
item = b_playlist ? p_playlist->p_playing
: p_playlist->p_media_library;
- item = playlist_NodeAddInput( p_playlist, p_input, item,
- play_now ? PLAYLIST_GO : 0, PLAYLIST_END );
+ item = playlist_NodeAddInput( p_playlist, p_input, item, 0, PLAYLIST_END );
+
+ if( likely(item != NULL) && play_now )
+ playlist_ViewPlay( p_playlist, NULL, item );
PL_UNLOCK;
return (item != NULL) ? VLC_SUCCESS : VLC_ENOMEM;
}
More information about the vlc-commits
mailing list