summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-07 16:16:18 +0100
committerwm4 <wm4@nowhere>2020-02-07 16:16:18 +0100
commit10a97f7cc3e3884c2fcb3981a7bc208d0f846b05 (patch)
treefdb96473b3377d07384e46ebcf8cce8a862e06db
parent11d223228cbaa22cbd42f2e8e2b7f5b6c12989a9 (diff)
downloadmpv-10a97f7cc3e3884c2fcb3981a7bc208d0f846b05.tar.bz2
mpv-10a97f7cc3e3884c2fcb3981a7bc208d0f846b05.tar.xz
osc: use cache state cache-duration field
Avoids an additional property access; see previous commit.
-rw-r--r--player/lua/osc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index e6a1e249dd..ec219a1fe0 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2020,7 +2020,7 @@ function osc_init()
-- probably not a network stream
return ""
end
- local dmx_cache = mp.get_property_number("demuxer-cache-duration")
+ local dmx_cache = cache_state and cache_state["cache-duration"]
local thresh = math.min(state.dmx_cache * 0.05, 5) -- 5% or 5s
if dmx_cache and math.abs(dmx_cache - state.dmx_cache) >= thresh then
state.dmx_cache = dmx_cache