mirror of https://github.com/mpv-player/mpv
select.lua: seek to the currect subtitle line when paused without video
Add an offset to sub seek correctly like in b35e34ae2f
. The extra 0.01
offset apparently isn't necessary in this case.
This commit is contained in:
parent
4059d1832b
commit
8939bfc3ef
|
@ -239,7 +239,11 @@ mp.add_forced_key_binding(nil, "select-subtitle-line", function ()
|
|||
items = sub_lines,
|
||||
default_item = default_item,
|
||||
submit = function (index)
|
||||
mp.commandv("seek", sub_times[index], "absolute")
|
||||
-- Add an offset to seek to the correct line while paused without a
|
||||
-- video track.
|
||||
local offset = mp.get_property_native("current-tracks/video/image") == false
|
||||
and 0 or .09
|
||||
mp.commandv("seek", sub_times[index] + offset, "absolute")
|
||||
end,
|
||||
})
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue