player: don't print status line again when quitting

Quitting is slightly asynchronous, so the status line can be updated
again. Normally, that's fine, but if quitting comes with a message (such
as with quit_watch_later), it will print the status line again after the
message, which looks annoying. So flush and clear the status message if
it's updated during quitting.
This commit is contained in:
wm4 2018-07-11 22:28:45 +02:00
parent bf05697653
commit cdc05c33b3
1 changed files with 5 additions and 2 deletions

View File

@ -267,10 +267,13 @@ static void term_osd_print_status_lazy(struct MPContext *mpctx)
if (!opts->use_terminal)
return;
if (opts->quiet || !mpctx->playback_initialized || !mpctx->playing_msg_shown)
if (opts->quiet || !mpctx->playback_initialized ||
!mpctx->playing_msg_shown || mpctx->stop_play)
{
if (!mpctx->playing)
if (!mpctx->playing || mpctx->stop_play) {
mp_msg_flush_status_line(mpctx->log);
term_osd_set_status_lazy(mpctx, "");
}
return;
}