Browse Source

player: call input_Stop before reporting the stopping state

Ensure that the player notifies the user about the stopping state
after the underlying input_thread begins stopping. Also, this is
required for the next commit, where the on_stopping_current_media
event notification will be moved inside vlc_player_input_HandleState
pull/192/head
Ayush Dey 4 months ago
committed by Thomas Guillem
parent
commit
81d88be5a7
  1. 2
      src/player/player.c

2
src/player/player.c

@ -202,6 +202,7 @@ vlc_player_destructor_Thread(void *data)
struct vlc_player_input *input;
vlc_list_foreach(input, &player->destructor.inputs, node)
{
input_Stop(input->thread);
vlc_player_input_HandleState(input, VLC_PLAYER_STATE_STOPPING,
VLC_TICK_INVALID);
vlc_player_destructor_AddStoppingInput(player, input);
@ -210,7 +211,6 @@ vlc_player_destructor_Thread(void *data)
* until input_Close() and the event is sent from the thread
* that will call this function. */
input_item_t *media = input_GetItem(input->thread);
input_Stop(input->thread);
vlc_player_SendEvent(player, on_stopping_current_media, media);
}

Loading…
Cancel
Save