summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-01-25 21:03:51 +0100
committerDudemanguy <random342@airmail.cc>2024-01-27 05:12:36 +0000
commitdd491c7c61508d72e3694ffa743b64c8dd938eff (patch)
tree7c3ebcdcea7ff0a2e005d5771a224796ad894145 /player/video.c
parentc243946338dcdcdbed9cfdc9d662d5612649932d (diff)
downloadmpv-dd491c7c61508d72e3694ffa743b64c8dd938eff.tar.bz2
mpv-dd491c7c61508d72e3694ffa743b64c8dd938eff.tar.xz
vo: change vo_frame duration to double
32-bit signed integer can hold ~2.1s stored as nanoseconds. While frame duration doesn't make sense to be this long, the existing clamp is to 10s. Change type to double, which is consistent with other fields in vo_frame.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 8599bbe702..6c93e1f576 100644
--- a/player/video.c
+++ b/player/video.c
@@ -1252,7 +1252,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) * 1e9;
+ frame->duration = MP_TIME_S_TO_NS(MPCLAMP(diff, 0, 10));
}
mpctx->video_pts = mpctx->next_frames[0]->pts;