[FFmpeg-cvslog] avfilter/af_sidechaincompress: fix pts handling when timebase and 1/samplerate differ
Paul B Mahol
git at videolan.org
Sun Nov 17 13:39:44 EET 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 17 12:30:10 2019 +0100| [f7ad9a6c168a086a4a135ddbe1e112c48c96e8d7] | committer: Paul B Mahol
avfilter/af_sidechaincompress: fix pts handling when timebase and 1/samplerate differ
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7ad9a6c168a086a4a135ddbe1e112c48c96e8d7
---
libavfilter/af_sidechaincompress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
More information about the ffmpeg-cvslog
mailing list