Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua scripting: setting time-pos property won't seek when both pause and vf are set. #4757

Closed
ekisu opened this issue Aug 13, 2017 · 0 comments

Comments

@ekisu
Copy link
Contributor

ekisu commented Aug 13, 2017

mpv version and platform

Windows 10.

mpv 0.26.0-147-gc20df5b3e1 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
 built on Sat Aug 12 08:49:31 UTC 2017
ffmpeg library versions:
   libavutil       55.73.100
   libavcodec      57.102.100
   libavformat     57.76.100
   libswscale      4.7.102
   libavfilter     6.98.100
   libswresample   2.8.100
ffmpeg version: git-2017-08-11-7735ed29

Reproduction steps

Set the pause property to true, time-pos to any valid value and vf to {}.

Expected behavior

mpv should seek to the second specified by time-pos.

Actual behavior

mpv pauses the video at the current position, without seeking. (actually, the log says it seeks to the current position, I don't know if this is useful or not).

Log file

https://pastebin.com/dGzPVCzQ
Look for "pause_seek" and "unpause_seek" for relevant output.

Sample files

Used the following Lua script to reproduce, "1" causes the bug, while "2" works property:

function pause_seek()
	mp.set_property_native("pause", true)
	mp.set_property_native("time-pos", 10.000)
	mp.set_property_native("vf", {})
end

function unpause_seek()
	mp.set_property_native("pause", false)
	mp.set_property_native("time-pos", 10.000)
	mp.set_property_native("vf", {})
end

mp.add_forced_key_binding("1", "pause_seek", pause_seek)
mp.add_forced_key_binding("2", "unpause_seek", unpause_seek)
@ghost ghost closed this as completed in 68201f4 Aug 14, 2017
ekisu added a commit to ekisu/mpv-webm that referenced this issue Aug 15, 2017
This stores the time-pos and pause properties on the preview start,
and restore them on the cancel function.

Due to a bug in mpv (mpv-player/mpv#4757), this might not work
sometimes in older releases, although the fix already landed on
upstream.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant