[vlc-devel] [PATCH 36/40] dbus: use playlist_ViewPlay() instead of PLAYLIST_GO
RĂ©mi Denis-Courmont
remi at remlab.net
Sun May 14 17:46:06 CEST 2017
---
modules/control/dbus/dbus_tracklist.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/control/dbus/dbus_tracklist.c b/modules/control/dbus/dbus_tracklist.c
index 899171a76e..aa3b6ba037 100644
--- a/modules/control/dbus/dbus_tracklist.c
+++ b/modules/control/dbus/dbus_tracklist.c
@@ -89,7 +89,7 @@ DBUS_METHOD( AddTrack )
return DBUS_HANDLER_RESULT_NEED_MEMORY;
playlist_t *p_playlist = PL;
- playlist_item_t *node;
+ playlist_item_t *node, *plitem;
PL_LOCK;
node = p_playlist->p_playing;
@@ -109,8 +109,10 @@ DBUS_METHOD( AddTrack )
}
}
- playlist_NodeAddInput( p_playlist, item, node,
- (b_play == TRUE) ? PLAYLIST_GO : 0, i_pos );
+ plitem = playlist_NodeAddInput( p_playlist, item, node, 0, i_pos );
+ if( likely(plitem != NULL) && b_play )
+ playlist_ViewPlay( p_playlist, NULL, plitem );
+
PL_UNLOCK;
input_item_Release( item );
--
2.11.0
More information about the vlc-devel
mailing list