[vlc-devel] [PATCH] player: play all media before exiting
Thomas Guillem
thomas at gllm.fr
Mon Nov 25 17:40:43 CET 2019
On Thu, Nov 14, 2019, at 16:12, Romain Vimont wrote:
> When --play-and-exit is set, exit only once there are no more media to
> play (do not exit after the first one).
>
> Fixes #23038
> ---
> src/player/player.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/player/player.c b/src/player/player.c
> index d624f7e345..7173c92f66 100644
> --- a/src/player/player.c
> +++ b/src/player/player.c
> @@ -54,9 +54,7 @@ vlc_player_PrepareNextMedia(vlc_player_t *player)
> {
> vlc_player_assert_locked(player);
>
> - if (!player->media_provider
> - || player->media_stopped_action != VLC_PLAYER_MEDIA_STOPPED_CONTINUE
> - || player->next_media_requested)
> + if (!player->media_provider || player->next_media_requested)
> return;
I think, only VLC_PLAYER_MEDIA_STOPPED_STOP should be tested:
if (!player->media_provider
|| player->media_stopped_action == VLC_PLAYER_MEDIA_STOPPED_STOP
|| player->next_media_requested)
return;
PAUSE, EXIT, CONTINUE doesn't need to bypass the fetching of the next media.
>
> assert(player->next_media == NULL);
> --
> 2.24.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list