From 6cbf9ac3c5c417d3f385622c3631298a84a1786b Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sat, 17 Jun 2023 15:59:39 +0300 Subject: [PATCH] don't set timings less than 0 --- videoclip.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/videoclip.lua b/videoclip.lua index 2544dd8..89220c4 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -384,7 +384,7 @@ main_menu.keybindings = { } function main_menu:set_time(property) - self.timings[property] = mp.get_property_number('time-pos') + self.timings[property] = math.max(0, mp.get_property_number('time-pos')) self:update() end @@ -397,7 +397,7 @@ function main_menu:set_time_sub(property) return end - self.timings[property] = time_pos + sub_delay + self.timings[property] = math.max(0, time_pos + sub_delay) self:update() end