0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

af: account for queued frames in audio position calculation

af_rubberband exposed this issue.
This commit is contained in:
wm4 2015-02-11 15:42:43 +01:00
parent 8c055f873f
commit d85aa35ffb

View File

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