Skip to content

Commit 0944996

Browse files
committed
fix cleanup
1 parent 25b6da0 commit 0944996

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/vlccrop.lua

+6-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ end
116116

117117
function cleanup()
118118
mp.msg.verbose("Cleanup")
119-
crop_option = 0 -- Reset crop option
120119

121120
-- This looks for applied filters that match the filter that we are using, then removes them
122121
local filters = mp.get_property_native("vf")
@@ -133,5 +132,10 @@ function cleanup()
133132
return false
134133
end
135134

135+
function on_start()
136+
cleanup()
137+
crop_option = 0 -- Reset crop option
138+
end
139+
136140
mp.add_key_binding("c", "toggle_crop", on_press)
137-
mp.register_event("file-loaded", cleanup)
141+
mp.register_event("file-loaded", on_start)

0 commit comments

Comments
 (0)