Properly handle delayed subtitles
Delayed subtitles where working properly for negative values. Positive delay values wheren't handled correctly.
This commit is contained in:
parent
087b031e75
commit
f428b3f6b3
|
@ -19,7 +19,8 @@ function check_should_speedup()
|
||||||
subdelay = mp.get_property_native("sub-delay")
|
subdelay = mp.get_property_native("sub-delay")
|
||||||
mp.command("no-osd set sub-visibility no")
|
mp.command("no-osd set sub-visibility no")
|
||||||
mp.command("no-osd sub-step 1")
|
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)
|
--print("nextsub in seconds "..nextsub)
|
||||||
mp.set_property("sub-delay", subdelay)
|
mp.set_property("sub-delay", subdelay)
|
||||||
mp.command("no-osd set sub-visibility yes")
|
mp.command("no-osd set sub-visibility yes")
|
||||||
|
|
Loading…
Reference in New Issue