mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
af: account for queued frames in audio position calculation
af_rubberband exposed this issue.
This commit is contained in:
parent
8c055f873f
commit
d85aa35ffb
@ -747,6 +747,8 @@ double af_calc_delay(struct af_stream *s)
|
||||
double delay = 0.0;
|
||||
while (af) {
|
||||
delay += af->delay;
|
||||
for (int n = 0; n < af->num_out_queued; n++)
|
||||
delay += af->out_queued[n]->samples / (double)af->data->rate;
|
||||
af = af->next;
|
||||
}
|
||||
return delay;
|
||||
|
Loading…
Reference in New Issue
Block a user