From b0c9f582adb4caac06c567ba1546f5773792bb14 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Dec 2019 19:21:14 +0100 Subject: player: loadfile overrides previous stop command Both the "stop" and "loadfile" commands are asynchronous. "stop" starts terminating playback, which used to be done in the same playloop iteration, but now it may take longer, so a "loadfile" command can be received while this is going on. (Possible that it used to work if the second command was issued at least in the next playloop iteration.) Make the "loadfile" override the "stop" mode, so the next file will be played, instead of quitting or going into idle mode. Unlike the referenced bug report claims, this has nothing to do with IPC. Fixes: #7225 --- player/loadfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 603b264f60..2535e75617 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1830,7 +1830,7 @@ void mp_set_playlist_entry(struct MPContext *mpctx, struct playlist_entry *e) mpctx->playlist->current = e; mpctx->playlist->current_was_replaced = false; // Make it pick up the new entry. - if (!mpctx->stop_play) + if (mpctx->stop_play != PT_QUIT) mpctx->stop_play = PT_CURRENT_ENTRY; mp_wakeup_core(mpctx); } -- cgit v1.2.3