[FFmpeg-cvslog] lavfi/avf_aphasemeter: set frame durations

Anton Khirnov git at videolan.org
Tue Oct 4 12:56:52 EEST 2022


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Aug 16 16:26:11 2022 +0200| [ae84484c78740c1c814276c3d5c9f7601abed936] | committer: Anton Khirnov

lavfi/avf_aphasemeter: set frame durations

The filter is supposed to produce CFR output.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae84484c78740c1c814276c3d5c9f7601abed936
---

 libavfilter/avf_aphasemeter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c
index 3501e62825..0f7692982c 100644
--- a/libavfilter/avf_aphasemeter.c
+++ b/libavfilter/avf_aphasemeter.c
@@ -327,6 +327,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
         AVFrame *clone;
 
         s->out->pts = in->pts;
+        s->out->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
+
         clone = av_frame_clone(s->out);
         if (!clone)
             return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list