mirror of
https://github.com/mpv-player/mpv
synced 2025-04-06 17:43:02 +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:
parent
846257da13
commit
d563dc8cb9
@ -324,6 +324,8 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek,
|
|||||||
mpctx->start_timestamp = mp_time_sec();
|
mpctx->start_timestamp = mp_time_sec();
|
||||||
mpctx->sleeptime = 0;
|
mpctx->sleeptime = 0;
|
||||||
|
|
||||||
|
mp_notify(mpctx, MPV_EVENT_TICK, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user