mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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.
This commit is contained in:
committed by
Dudemanguy
parent
c243946338
commit
dd491c7c61
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user