diff options
author | wm4 <wm4@nowhere> | 2018-05-10 16:49:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:34 +0200 |
commit | 0354e7c5990c32bef97c16d90f5962860f31f820 (patch) | |
tree | e5217663b6262ef74823bd8c3a9c370464cf39e5 /player/video.c | |
parent | cc2490ea7eb4dc1480bc26d62a3bbb15d387c35b (diff) | |
download | mpv-0354e7c5990c32bef97c16d90f5962860f31f820.tar.bz2 mpv-0354e7c5990c32bef97c16d90f5962860f31f820.tar.xz |
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.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index 7478c64806..ab8490542d 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; } |