diff mbox series

[FFmpeg-devel,4/8] lavfi/avf_aphasemeter: set frame durations

Message ID 20220928092132.31566-4-anton@khirnov.net
State Accepted
Commit ae84484c78740c1c814276c3d5c9f7601abed936
Headers show
Series [FFmpeg-devel,1/8] lavfi/vf_fps: set frame duration | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Sept. 28, 2022, 9:21 a.m. UTC
The filter is supposed to produce CFR output.
---
 libavfilter/avf_aphasemeter.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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);