From c337b0f826ea1ca3b52a1e1d264871e37b660e87 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 22 Feb 2022 12:04:35 +0100 Subject: avfilter/af_afir: remove pts rewriting code This is not needed at all. --- libavfilter/af_afir.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libavfilter/af_afir.c') diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index 7690218ff4..86ce503e7a 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -220,17 +220,12 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink) av_frame_free(&in); return AVERROR(ENOMEM); } + out->pts = in->pts; - if (s->pts == AV_NOPTS_VALUE) - s->pts = in->pts; s->in = in; ff_filter_execute(ctx, fir_channels, out, NULL, FFMIN(outlink->channels, ff_filter_get_nb_threads(ctx))); - out->pts = s->pts; - if (s->pts != AV_NOPTS_VALUE) - s->pts += av_rescale_q(out->nb_samples, (AVRational){1, outlink->sample_rate}, outlink->time_base); - av_frame_free(&in); s->in = NULL; @@ -773,7 +768,6 @@ static int config_output(AVFilterLink *outlink) s->nb_channels = outlink->channels; s->nb_coef_channels = ctx->inputs[1 + s->selir]->channels; - s->pts = AV_NOPTS_VALUE; return 0; } -- cgit v1.2.3