player: fix average frame duration calculation

This commit is contained in:
sda89ha9 2016-09-09 18:56:45 +02:00 committed by wm4
parent 04320d26eb
commit d054a7181f
1 changed files with 1 additions and 1 deletions

View File

@ -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;