diff options
author | wm4 <wm4@nowhere> | 2016-01-20 16:52:32 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-20 16:52:32 +0100 |
commit | ff43215960b33e9137fd619bc13b2e103cf5eda8 (patch) | |
tree | b4d013548b4fb973707b73b9c72004da43ea18e4 /player | |
parent | f352669157bc77d54cf851df6eb919213cc5a099 (diff) | |
download | mpv-ff43215960b33e9137fd619bc13b2e103cf5eda8.tar.bz2 mpv-ff43215960b33e9137fd619bc13b2e103cf5eda8.tar.xz |
player: never show "DS: (unavailable)"
Kind of annoying.
Diffstat (limited to 'player')
-rw-r--r-- | player/osd.c | 9 |
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); |