From d85aa35ffbd978c7ae86bf84ebf9ac7686312e8f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 11 Feb 2015 15:42:43 +0100 Subject: af: account for queued frames in audio position calculation af_rubberband exposed this issue. --- audio/filter/af.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio') diff --git a/audio/filter/af.c b/audio/filter/af.c index bde469db8b..846ebea3c3 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -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; -- cgit v1.2.3