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
This commit is contained in:
wm4 2019-12-06 19:21:14 +01:00
parent 13fe87f66b
commit b0c9f582ad
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}