[FFmpeg-devel] [PATCH 3/8] lavfi/vf_tinterlace: set frame durations

Anton Khirnov anton at khirnov.net
Mon Oct 10 19:10:50 EEST 2022


This filter is supposed to produce CFR output.
---
 libavfilter/vf_tinterlace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 399adc102d..7c54861de4 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -510,6 +510,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
     }
 
     out->pts = av_rescale_q(out->pts, tinterlace->preout_time_base, outlink->time_base);
+    out->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
     ret = ff_filter_frame(outlink, out);
 
     return ret;
-- 
2.35.1



More information about the ffmpeg-devel mailing list