[FFmpeg-cvslog] avfilter/af_afir: remove pts rewriting code
Paul B Mahol
git at videolan.org
Tue Feb 22 14:25:28 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Feb 22 12:04:35 2022 +0100| [c337b0f826ea1ca3b52a1e1d264871e37b660e87] | committer: Paul B Mahol
avfilter/af_afir: remove pts rewriting code
This is not needed at all.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c337b0f826ea1ca3b52a1e1d264871e37b660e87
---
libavfilter/af_afir.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
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;
}
More information about the ffmpeg-cvslog
mailing list