aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-11-17 12:30:10 +0100
committerPaul B Mahol <onemda@gmail.com>2019-11-17 12:30:10 +0100
commitf7ad9a6c168a086a4a135ddbe1e112c48c96e8d7 (patch)
treecb4532e6a4c4490183368b58bdad4b613d2131b3
parentb66acf4a3403e99a4c14a8b90a7e23e3274d1a8e (diff)
downloadffmpeg-f7ad9a6c168a086a4a135ddbe1e112c48c96e8d7.tar.gz
avfilter/af_sidechaincompress: fix pts handling when timebase and 1/samplerate differ
-rw-r--r--libavfilter/af_sidechaincompress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c
index 219643acb6..8199ec6b44 100644
--- a/libavfilter/af_sidechaincompress.c
+++ b/libavfilter/af_sidechaincompress.c
@@ -256,7 +256,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);
compressor(s, (double *)in[0]->data[0], dst,
(double *)in[1]->data[0], nb_samples,