aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-04-18 20:22:34 +0200
committerPaul B Mahol <onemda@gmail.com>2022-04-18 20:24:54 +0200
commitd41f85235dad4577c806381576821abe4f6ca97f (patch)
treea5315b6d89ff886332fbf59b06940bcc99f43c34
parent9f73c40d324211756ab6de3573495b5a12aeab9d (diff)
downloadffmpeg-d41f85235dad4577c806381576821abe4f6ca97f.tar.gz
avfilter/avf_avectorscope: set time_base to outlink
And rescale timestamps.
-rw-r--r--libavfilter/avf_avectorscope.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c
index b873599ac7..200b2e452c 100644
--- a/libavfilter/avf_avectorscope.c
+++ b/libavfilter/avf_avectorscope.c
@@ -240,6 +240,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);
s->prev_x = s->hw = s->w / 2;
s->prev_y = s->hh = s->mode == POLAR ? s->h - 1 : s->h / 2;
@@ -273,7 +274,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
for (i = 0; i < outlink->h; i++)
memset(s->outpicref->data[0] + i * s->outpicref->linesize[0], 0, outlink->w * 4);
}
- s->outpicref->pts = insamples->pts;
+ s->outpicref->pts = av_rescale_q(insamples->pts, inlink->time_base, outlink->time_base);
av_frame_make_writable(s->outpicref);
ff_filter_execute(ctx, fade, NULL, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));