summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-11 13:30:08 +0200
committerwm4 <wm4@nowhere>2014-08-11 13:30:08 +0200
commita87005b7fae807d2e3ae3181d97712b643b89d4d (patch)
tree3d737b13eee66a009279592bf6a3a090ea122ab9 /player/command.c
parentb016f92309403fbd3598e70699464692de8e8f4b (diff)
downloadmpv-a87005b7fae807d2e3ae3181d97712b643b89d4d.tar.bz2
mpv-a87005b7fae807d2e3ae3181d97712b643b89d4d.tar.xz
command: for OSD, format cache property as integer
For convenience. Use ${=cache} to get the old formatting.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index cae7e02805..c0800d612d 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1099,6 +1099,11 @@ static int mp_property_cache(void *ctx, struct m_property *prop,
if (cache < 0)
return M_PROPERTY_UNAVAILABLE;
+ if (action == M_PROPERTY_PRINT) {
+ *(char **)arg = talloc_asprintf(NULL, "%d %%", (int)cache);
+ return M_PROPERTY_OK;
+ }
+
return m_property_float_ro(action, arg, cache);
}