mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/avf_avectorscope: set time_base to outlink
And rescale timestamps.
This commit is contained in:
parent
9f73c40d32
commit
d41f85235d
@ -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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user