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
+2
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;