mirror of
https://github.com/mpv-player/mpv
synced 2025-02-05 22:52:18 +00:00
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
Block a user