1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

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.)
This commit is contained in:
wm4 2014-07-29 00:07:54 +02:00
parent 846257da13
commit d563dc8cb9

View File

@ -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;
}