summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-08-31 22:07:26 +0200
committerDudemanguy <random342@airmail.cc>2023-09-21 13:50:21 +0000
commit252347731a5f8c254b8c3cac90dc1f5d2c81e0e4 (patch)
treef5221c1820239e9bdb111483ea8df011a8dfaaff /TOOLS
parent66c92dc059196fbb9c9b3afea321abfa0aace25f (diff)
downloadmpv-252347731a5f8c254b8c3cac90dc1f5d2c81e0e4.tar.bz2
mpv-252347731a5f8c254b8c3cac90dc1f5d2c81e0e4.tar.xz
TOOLS/autocrop.lua: cleanup timers correctly
If you change file while cropdetect is active and you try to crop the next video, it fails with "Already cropdetecting!". This is because timers.detect_crop wasn't cleared correctly, only the timer variable local to the loop was being set to nil.
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/lua/autocrop.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/TOOLS/lua/autocrop.lua b/TOOLS/lua/autocrop.lua
index 139b04d23e..d7e3e0b858 100644
--- a/TOOLS/lua/autocrop.lua
+++ b/TOOLS/lua/autocrop.lua
@@ -137,7 +137,7 @@ function cleanup()
for index, timer in pairs(timers) do
if timer then
timer:kill()
- timer = nil
+ timers[index] = nil
end
end
end