From 10a97f7cc3e3884c2fcb3981a7bc208d0f846b05 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 7 Feb 2020 16:16:18 +0100 Subject: osc: use cache state cache-duration field Avoids an additional property access; see previous commit. --- player/lua/osc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/lua') 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 -- cgit v1.2.3