diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-17 20:44:05 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-10 19:10:55 +0000 |
commit | c82c55b4b9d4015ba79fb36170defb328563cdea (patch) | |
tree | 326dfdfbe8d262d09d741945b89ccb1b111c3956 /player/video.c | |
parent | 8fccd6bf91abe42a032b2c7c14bb7a0366ad19bf (diff) | |
download | mpv-c82c55b4b9d4015ba79fb36170defb328563cdea.tar.bz2 mpv-c82c55b4b9d4015ba79fb36170defb328563cdea.tar.xz |
vo: use nanoseconds for frame duration and pts
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/video.c b/player/video.c index 7da9cf46fe..e5b0b6b3a2 100644 --- a/player/video.c +++ b/player/video.c @@ -1198,7 +1198,7 @@ void write_video(struct MPContext *mpctx) } double time_frame = MPMAX(mpctx->time_frame, -1); - int64_t pts = mp_time_us() + (int64_t)(time_frame * 1e6); + int64_t pts = mp_time_ns() + (int64_t)(time_frame * 1e9); // wait until VO wakes us up to get more frames // (NB: in theory, the 1st frame after display sync mode change uses the @@ -1240,7 +1240,7 @@ void write_video(struct MPContext *mpctx) diff /= mpctx->video_speed; if (mpctx->time_frame < 0) diff += mpctx->time_frame; - frame->duration = MPCLAMP(diff, 0, 10) * 1e6; + frame->duration = MPCLAMP(diff, 0, 10) * 1e9; } mpctx->video_pts = mpctx->next_frames[0]->pts; |