summaryrefslogtreecommitdiffstats
path: root/m_property.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-01 21:59:13 +0200
committerwm4 <wm4@nowhere>2012-09-18 21:04:47 +0200
commit53bfaecd40aa7b34dcc9c90064e36f2ffe227fc0 (patch)
tree7c8865437d2e48d1c9782c37520d04d3e0604dca /m_property.c
parent5a13f5a5e8dd63c899581db86c51c9bb093fcdde (diff)
downloadmpv-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 'm_property.c')
-rw-r--r--m_property.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/m_property.c b/m_property.c
index 35c2c0e3b1..4d1fb90ed6 100644
--- a/m_property.c
+++ b/m_property.c
@@ -380,16 +380,6 @@ int m_property_double_ro(const m_option_t *prop, int action,
return M_PROPERTY_NOT_IMPLEMENTED;
}
-static char *format_time(double time)
-{
- int h, m, s = time;
- h = s / 3600;
- s -= h * 3600;
- m = s / 60;
- s -= m * 60;
- return talloc_asprintf(NULL, "%02d:%02d:%02d", h, m, s);
-}
-
int m_property_time_ro(const m_option_t *prop, int action,
void *arg, double var)
{
@@ -398,7 +388,7 @@ int m_property_time_ro(const m_option_t *prop, int action,
if (!arg)
return M_PROPERTY_ERROR;
else {
- *(char **)arg = format_time(var);
+ *(char **)arg = mp_format_time(var, false);
return M_PROPERTY_OK;
}
}