From ff43215960b33e9137fd619bc13b2e103cf5eda8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 20 Jan 2016 16:52:32 +0100 Subject: player: never show "DS: (unavailable)" Kind of annoying. --- player/osd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'player/osd.c') 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); -- cgit v1.2.3