From f428b3f6b3cfff1c4eda3469458fa7010a9744ea Mon Sep 17 00:00:00 2001 From: zenyd Date: Thu, 14 Sep 2017 20:27:40 +0200 Subject: [PATCH] Properly handle delayed subtitles Delayed subtitles where working properly for negative values. Positive delay values wheren't handled correctly. --- speed-transition.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/speed-transition.lua b/speed-transition.lua index 6cc7340..d9d3605 100644 --- a/speed-transition.lua +++ b/speed-transition.lua @@ -19,7 +19,8 @@ function check_should_speedup() subdelay = mp.get_property_native("sub-delay") mp.command("no-osd set sub-visibility no") mp.command("no-osd sub-step 1") - nextsub = math.abs(mp.get_property_native("sub-delay"))-math.abs(subdelay) + nextsubdelay = mp.get_property_native("sub-delay") + nextsub = subdelay - nextsubdelay --print("nextsub in seconds "..nextsub) mp.set_property("sub-delay", subdelay) mp.command("no-osd set sub-visibility yes")