summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-14 19:20:36 +0200
committerwm4 <wm4@nowhere>2014-10-14 19:20:36 +0200
commit7c69848e3eb7ca2543233465333693285c54b1e6 (patch)
tree835ecb34a67d4e9bcc48f9b0f838576f37692062 /player/osd.c
parentaa141435784a4967bcadfe1a2f87fa3460d61d6e (diff)
downloadmpv-7c69848e3eb7ca2543233465333693285c54b1e6.tar.bz2
mpv-7c69848e3eb7ca2543233465333693285c54b1e6.tar.xz
player: fix OSD cycling
OSD cycling attempted to remove the current message by setting an empty message with duration 0. Duration 0 tripped up a corner case causing no OSD to be displayed (until the next message was set), so exclude this explicitly.
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/osd.c b/player/osd.c
index 605c4b6757..eccaf742e4 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -274,6 +274,8 @@ static bool set_osd_msg_va(struct MPContext *mpctx, int level, int time,
mpctx->osd_msg_next_duration = time / 1000.0;
mpctx->osd_force_update = true;
mpctx->sleeptime = 0;
+ if (mpctx->osd_msg_next_duration <= 0)
+ mpctx->osd_msg_visible = mp_time_sec();
return true;
}