diff options
author | wm4 <wm4@nowhere> | 2014-08-11 13:30:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-11 13:30:08 +0200 |
commit | a87005b7fae807d2e3ae3181d97712b643b89d4d (patch) | |
tree | 3d737b13eee66a009279592bf6a3a090ea122ab9 /player | |
parent | b016f92309403fbd3598e70699464692de8e8f4b (diff) | |
download | mpv-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')
-rw-r--r-- | player/command.c | 5 |
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); } |