diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-01-17 18:26:41 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-01-17 18:36:37 +0100 |
commit | a13931843eccb35fe6a594a33e04869173cb94b6 (patch) | |
tree | c2cfde29872ca4b48554b10aef5b04ca1629826f | |
parent | 2c3f211b6dacf314f235fc700cd31084049a6886 (diff) | |
download | ffmpeg-a13931843eccb35fe6a594a33e04869173cb94b6.tar.gz |
avfilter/avf_abitscope: set output time_base and output frame duration
-rw-r--r-- | libavfilter/avf_abitscope.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |