aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-11-17 12:23:48 +0100
committerPaul B Mahol <onemda@gmail.com>2019-11-17 12:23:48 +0100
commit0a17a30150560b8d20feee9266145d0b21a1e720 (patch)
treeedb58b04104e0f1cbde61293cf95410260c7fb39
parent115537f48759ca64fa82e9c72330453661d3661d (diff)
downloadffmpeg-0a17a30150560b8d20feee9266145d0b21a1e720.tar.gz
avfilter/af_agate: fix pts handling when timebase and 1/samplerate differ
-rw-r--r--libavfilter/af_agate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c
index 0609dc222e..936caa0a44 100644
--- a/libavfilter/af_agate.c
+++ b/libavfilter/af_agate.c
@@ -318,7 +318,7 @@ static int activate(AVFilterContext *ctx)
dst = (double *)out->data[0];
out->pts = s->pts;
- s->pts += nb_samples;
+ s->pts += av_rescale_q(nb_samples, (AVRational){1, ctx->outputs[0]->sample_rate}, ctx->outputs[0]->time_base);
gate(s, (double *)in[0]->data[0], dst,
(double *)in[1]->data[0], nb_samples,