diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index 398d74a643..d6140773eb 100644 --- a/player/video.c +++ b/player/video.c @@ -1058,9 +1058,9 @@ static void calculate_frame_duration(struct MPContext *mpctx) total += dur; num_dur += 1; } + double approx_duration = num_dur > 0 ? total / num_dur : duration; // Try if the demuxer frame rate fits - if so, just take it. - double approx_duration = duration; if (demux_duration > 0) { // Note that even if each timestamp is within rounding tolerance, it // could literally not add up (e.g. if demuxer FPS is rounded itself). |