summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-07-11 22:28:45 +0200
committerwm4 <wm4@nowhere>2018-08-11 22:45:03 +0200
commitcdc05c33b33d958a8877851bd5942adbb856f5e4 (patch)
treec8f63acb2398365ca03791482ab893c871fd5b16 /player
parentbf0569765349701b83a3902804f22bcb1d51e0c7 (diff)
downloadmpv-cdc05c33b33d958a8877851bd5942adbb856f5e4.tar.bz2
mpv-cdc05c33b33d958a8877851bd5942adbb856f5e4.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/osd.c7
1 files changed, 5 insertions, 2 deletions
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;
}