summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-20 16:52:32 +0100
committerwm4 <wm4@nowhere>2016-01-20 16:52:32 +0100
commitff43215960b33e9137fd619bc13b2e103cf5eda8 (patch)
treeb4d013548b4fb973707b73b9c72004da43ea18e4 /player/osd.c
parentf352669157bc77d54cf851df6eb919213cc5a099 (diff)
downloadmpv-ff43215960b33e9137fd619bc13b2e103cf5eda8.tar.bz2
mpv-ff43215960b33e9137fd619bc13b2e103cf5eda8.tar.xz
player: never show "DS: (unavailable)"
Kind of annoying.
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/player/osd.c b/player/osd.c
index 8912873368..9ee7ea7576 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -237,9 +237,12 @@ static void print_status(struct MPContext *mpctx)
// VO stats
if (mpctx->vo_chain) {
if (mpctx->display_sync_active) {
- char *r = mp_property_expand_string(mpctx, "${vsync-ratio}");
- saddf(&line, " DS: %s/%"PRId64, r,
- vo_get_delayed_count(mpctx->video_out));
+ char *r = mp_property_expand_string(mpctx,
+ "${?vsync-ratio:${vsync-ratio}}");
+ if (r[0]) {
+ saddf(&line, " DS: %s/%"PRId64, r,
+ vo_get_delayed_count(mpctx->video_out));
+ }
talloc_free(r);
}
int64_t c = vo_get_drop_count(mpctx->video_out);