summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/lua/osc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 408ca47c91..e6a1e249dd 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2021,8 +2021,8 @@ function osc_init()
return ""
end
local dmx_cache = mp.get_property_number("demuxer-cache-duration")
- if dmx_cache and (dmx_cache > state.dmx_cache * 1.1 or
- dmx_cache < state.dmx_cache * 0.9) then
+ 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
else
dmx_cache = state.dmx_cache