From 47ed894d19678c915a3185945b3f97baeeecafb4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 10 May 2018 16:49:50 +0200 Subject: video: trust container FPS early on if possible If the container FPS is correct, this can help getting ideal mix factors for vo_gpu interpolation mode. Otherwise, it doesn't matter. --- player/video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/player/video.c b/player/video.c index fde92851a1..a342b31d04 100644 --- a/player/video.c +++ b/player/video.c @@ -955,7 +955,8 @@ static void calculate_frame_duration(struct MPContext *mpctx) // Note that even if each timestamp is within rounding tolerance, it // could literally not add up (e.g. if demuxer FPS is rounded itself). if (fabs(duration - demux_duration) < tolerance && - fabs(total - demux_duration * num_dur) < tolerance && num_dur >= 16) + fabs(total - demux_duration * num_dur) < tolerance && + (num_dur >= 16 || num_dur >= mpctx->num_past_frames - 4)) { approx_duration = demux_duration; } -- cgit v1.2.3