1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/af_sidechaincompress: fix pts handling when timebase and 1/samplerate differ

This commit is contained in:
Paul B Mahol 2019-11-17 12:30:10 +01:00
parent b66acf4a34
commit f7ad9a6c16

View File

@ -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,