summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-04-30 19:28:37 +0200
committerJan Ekström <jeebjp@gmail.com>2018-05-01 00:25:27 +0300
commit3c2d20e414cecbb28c5faa56c13135cef871ab4e (patch)
treee8e5e7a5de47f50b308670959fd3a6ba5617f69d
parent8f67fa13f1a61eccd12d85bc20c87b17e9f1f3ec (diff)
downloadmpv-3c2d20e414cecbb28c5faa56c13135cef871ab4e.tar.bz2
mpv-3c2d20e414cecbb28c5faa56c13135cef871ab4e.tar.xz
common: add missing %f time format
It was documented for --screenshot-template, but apparently never implemented. This value is not explicitly rounded, other than for printf() %f default formatting (which rounds to 6 digits).
-rw-r--r--common/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/common.c b/common/common.c
index 786d2e5328..e8a100dcc4 100644
--- a/common/common.c
+++ b/common/common.c
@@ -72,6 +72,7 @@ char *mp_format_time_fmt(const char *fmt, double time)
case 's': appendf(&res, "%s%lld", sign, itime); break;
case 'S': appendf(&res, "%02lld", s); break;
case 'T': appendf(&res, "%03d", ms); break;
+ case 'f': appendf(&res, "%f", time); break;
case '%': appendf(&res, "%s", "%"); break;
default: goto error;
}