diff options
author | wm4 <wm4@nowhere> | 2012-09-01 21:59:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-18 21:04:47 +0200 |
commit | 53bfaecd40aa7b34dcc9c90064e36f2ffe227fc0 (patch) | |
tree | 7c8865437d2e48d1c9782c37520d04d3e0604dca /mplayer.c | |
parent | 5a13f5a5e8dd63c899581db86c51c9bb093fcdde (diff) | |
download | mpv-53bfaecd40aa7b34dcc9c90064e36f2ffe227fc0.tar.bz2 mpv-53bfaecd40aa7b34dcc9c90064e36f2ffe227fc0.tar.xz |
core: remove duplicated format_time() functions
This was an on-going transition to make mplayer format all times in the
same format.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -1151,20 +1151,9 @@ static void saddf(char *buf, int len, const char *format, ...) */ static void sadd_hhmmssff(char *buf, int len, double time, bool fractions) { - if (time < 0) { - saddf(buf, len, "unknown"); - return; - } - int h, m, s = time; - h = s / 3600; - s -= h * 3600; - m = s / 60; - s -= m * 60; - saddf(buf, len, "%02d:", h); - saddf(buf, len, "%02d:", m); - saddf(buf, len, "%02d", s); - if (fractions) - saddf(buf, len, ".%02d", (int)((time - (int)time) * 100)); + char *s = mp_format_time(time, fractions); + saddf(buf, len, "%s", s); + talloc_free(s); } static void sadd_percentage(char *buf, int len, int percent) { |