af: account for queued frames in audio position calculation

af_rubberband exposed this issue.
This commit is contained in:
wm4 committed 2015-02-11 16:32:40 +01:00
1 parent 8c055f873f
commit d85aa35ffb
1 file changed
+2
+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;