mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-22 10:45:53 +08:00
af: account for queued frames in audio position calculation
af_rubberband exposed this issue.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user