summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-29 00:07:54 +0200
committerwm4 <wm4@nowhere>2014-07-29 00:20:54 +0200
commitd563dc8cb94e6313871646ca51f502f9db19b177 (patch)
tree5495e1761001b37b1f51b49a9170ac8c4002bf8a /player
parent846257da13494f910f44c9ea8a56a3c2ef669a0f (diff)
downloadmpv-d563dc8cb94e6313871646ca51f502f9db19b177.tar.bz2
mpv-d563dc8cb94e6313871646ca51f502f9db19b177.tar.xz
player: update playback position on seek
If the actual PTS is not known yet right after a seek, the "time-pos" property will just return the seek target PTS. For this purpose, trigger a change event to make the client API update the "time-pos" and related properties. (MPV_EVENT_TICK triggers this update.)
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c
index f17f44311e..4f1af50afe 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -324,6 +324,8 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
mpctx->start_timestamp = mp_time_sec();
mpctx->sleeptime = 0;
+ mp_notify(mpctx, MPV_EVENT_TICK, NULL);
+
return 0;
}