From cdc05c33b33d958a8877851bd5942adbb856f5e4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 11 Jul 2018 22:28:45 +0200 Subject: 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. --- player/osd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'player') diff --git a/player/osd.c b/player/osd.c index 0ae8dcd1f4..9faf6eb6a5 100644 --- a/player/osd.c +++ b/player/osd.c @@ -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; } -- cgit v1.2.3