diff options
author | wm4 <wm4@nowhere> | 2018-05-10 16:49:50 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2018-05-25 10:45:54 +0200 |
commit | 47ed894d19678c915a3185945b3f97baeeecafb4 (patch) | |
tree | 319395d1784cd14e3895c4cbf360cc7e388e1ed5 /player | |
parent | 1d46368404865a8509e2ed49e6a3adefb0da749b (diff) | |
download | mpv-47ed894d19678c915a3185945b3f97baeeecafb4.tar.bz2 mpv-47ed894d19678c915a3185945b3f97baeeecafb4.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')
-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 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; } |