[FFmpeg-cvslog] avfilter/avf_ahistogram: set time_base to outlink
Paul B Mahol
git at videolan.org
Tue Apr 19 20:20:38 EEST 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Apr 19 19:15:21 2022 +0200| [8b717a40441659d852517a2326646ad4dbd96f7d] | committer: Paul B Mahol
avfilter/avf_ahistogram: set time_base to outlink
And rescale timestamps.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b717a40441659d852517a2326646ad4dbd96f7d
---
libavfilter/avf_ahistogram.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c
index ebd4949b3d..4f2059f26e 100644
--- a/libavfilter/avf_ahistogram.c
+++ b/libavfilter/avf_ahistogram.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list