Commit b961e412 authored by Pierre's avatar Pierre

media_list_player: Strictier lock in libvlc_media_list_player_play*().

parent c1c1ff8e
......@@ -505,14 +505,13 @@ void libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t * p_
lock(p_mlp);
set_current_playing_item(p_mlp, libvlc_media_list_path_with_root_index(i_index));
libvlc_media_player_play(p_mlp->p_mi, p_e);
unlock(p_mlp);
/* Send the next item event */
libvlc_event_t event;
event.type = libvlc_MediaListPlayerNextItemSet;
libvlc_event_send(p_mlp->p_event_manager, &event);
libvlc_media_player_play(p_mlp->p_mi, p_e);
}
/**************************************************************************
......@@ -520,18 +519,18 @@ void libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t * p_
**************************************************************************/
void libvlc_media_list_player_play_item(libvlc_media_list_player_t * p_mlp, libvlc_media_t * p_md, libvlc_exception_t * p_e)
{
lock(p_mlp);
libvlc_media_list_path_t path = libvlc_media_list_path_of_item(p_mlp->p_mlist, p_md);
if (!path)
{
libvlc_exception_raise(p_e, "No such item in media list");
unlock(p_mlp);
return;
}
lock(p_mlp);
set_current_playing_item(p_mlp, path);
unlock(p_mlp);
set_current_playing_item(p_mlp, path);
libvlc_media_player_play(p_mlp->p_mi, p_e);
unlock(p_mlp);
}
/**************************************************************************
......
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