From abf1fc9a77d6d33132ffd046dcca13e14629740f 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. (cherry picked from commit d85aa35ffbd978c7ae86bf84ebf9ac7686312e8f) --- audio/filter/af.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/filter') diff --git a/audio/filter/af.c b/audio/filter/af.c index dc534efa5b..32e49002f0 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -743,6 +743,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