Commit c64c794e authored by Mark Lee's avatar Mark Lee Committed by Rémi Denis-Courmont

In libvlc_media_list_player_play_item_at_index() set the media descriptor on the NextItemSet event.

This is now the same as was already implemented in the
set_relative_playlist_position_and_play() method.
parent d9d51ffa
......@@ -646,14 +646,18 @@ libvlc_media_list_player_get_state(libvlc_media_list_player_t * p_mlp)
int libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t * p_mlp, int i_index)
set_current_playing_item(p_mlp, libvlc_media_list_path_with_root_index(i_index));
libvlc_media_list_path_t path = libvlc_media_list_path_with_root_index(i_index);
set_current_playing_item(p_mlp, path);
/* Send the next item event */
libvlc_event_t event;
event.type = libvlc_MediaListPlayerNextItemSet;
libvlc_media_t * p_md = libvlc_media_list_item_at_path(p_mlp->p_mlist, path);
event.u.media_list_player_next_item_set.item = p_md;
libvlc_event_send(p_mlp->p_event_manager, &event);
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment