summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-24 16:21:47 +0200
committerwm4 <wm4@nowhere>2019-10-24 16:27:05 +0200
commit962a9fa9812eacd25dd96ce6bf3c0f7cdce4df1c (patch)
treed21074ce399c377c2c1e39324e8f828b6c4054c2 /player
parentbc2058fcd461c8c4e91f4200c73c3b4f3c726b82 (diff)
downloadmpv-962a9fa9812eacd25dd96ce6bf3c0f7cdce4df1c.tar.bz2
mpv-962a9fa9812eacd25dd96ce6bf3c0f7cdce4df1c.tar.xz
lua: actually unobserve properties in mp.unobserve_property()
Not doing this looked like a memory leak. This looks like an oversight in the commit that added it: a94020e25bc5f, possible brain damage? Fixes: #6823
Diffstat (limited to 'player')
-rw-r--r--player/lua/defaults.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua
index 523b649b8c..7cf06426ff 100644
--- a/player/lua/defaults.lua
+++ b/player/lua/defaults.lua
@@ -355,6 +355,7 @@ function mp.unobserve_property(cb)
for prop_id, prop_cb in pairs(properties) do
if cb == prop_cb then
properties[prop_id] = nil
+ mp.raw_unobserve_property(prop_id)
end
end
end