summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorsda89ha9 <sda89ha9>2016-09-09 18:56:45 +0200
committerwm4 <wm4@nowhere>2016-09-09 19:18:08 +0200
commitd054a7181fb92bdd2703d0301800fd52daf3cf86 (patch)
treeb288381ced506ac9f716414bc319a2ced170b2b9 /player
parent04320d26ebb8a9ea2cfba9a7b6ddec0920326233 (diff)
downloadmpv-d054a7181fb92bdd2703d0301800fd52daf3cf86.tar.bz2
mpv-d054a7181fb92bdd2703d0301800fd52daf3cf86.tar.xz
player: fix average frame duration calculation
Diffstat (limited to 'player')
-rw-r--r--player/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 342ff66ce4..5e87564690 100644
--- a/player/video.c
+++ b/player/video.c
@@ -986,7 +986,7 @@ double calc_average_frame_duration(struct MPContext *mpctx)
double total = 0;
int num = 0;
for (int n = 0; n < mpctx->num_past_frames; n++) {
- double dur = mpctx->past_frames[0].approx_duration;
+ double dur = mpctx->past_frames[n].approx_duration;
if (dur <= 0)
continue;
total += dur;