mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avfilter/avf_ahistogram: set time_base to outlink
And rescale timestamps.
This commit is contained in:
parent
b2823333d5
commit
8b717a4044
@ -167,6 +167,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->histogram_h = s->h * s->phisto;
|
||||
s->ypos = s->h * s->phisto;
|
||||
@ -243,7 +244,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
memset(s->out->data[2] + n * s->out->linesize[0], 127, w);
|
||||
memset(s->out->data[3] + n * s->out->linesize[0], 0, w);
|
||||
}
|
||||
s->out->pts = in->pts;
|
||||
s->out->pts = av_rescale_q(in->pts, inlink->time_base, outlink->time_base);
|
||||
|
||||
s->first = s->frame_count;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user