mirror of https://github.com/mpv-player/mpv
player: fix average frame duration calculation
This commit is contained in:
parent
04320d26eb
commit
d054a7181f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue