mirror of
https://github.com/mpv-player/mpv
synced 2025-02-09 16:37:24 +00:00
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:
parent
13fe87f66b
commit
b0c9f582ad
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user