[vlc-devel] [PATCH 38/40] playlist: use playlist_ViewPlay() instead of PLAYLIST_GO
RĂ©mi Denis-Courmont
remi at remlab.net
Sun May 14 17:46:08 CEST 2017
---
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;
}
--
2.11.0
More information about the vlc-devel
mailing list