From a13931843eccb35fe6a594a33e04869173cb94b6 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 17 Jan 2023 18:26:41 +0100 Subject: [PATCH] avfilter/avf_abitscope: set output time_base and output frame duration --- libavfilter/avf_abitscope.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c index 58e2bdaf61..4fc3c06ecb 100644 --- a/libavfilter/avf_abitscope.c +++ b/libavfilter/avf_abitscope.c @@ -143,6 +143,7 @@ static int config_output(AVFilterLink *outlink) outlink->h = s->h; outlink->sample_aspect_ratio = (AVRational){1,1}; outlink->frame_rate = s->frame_rate; + outlink->time_base = av_inv_q(outlink->frame_rate); return 0; } @@ -233,7 +234,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) return AVERROR(ENOMEM); } - outpicref->pts = insamples->pts; + outpicref->pts = av_rescale_q(insamples->pts, inlink->time_base, outlink->time_base); + outpicref->duration = 1; outpicref->sample_aspect_ratio = (AVRational){1,1}; switch (insamples->format) {