[FFmpeg-cvslog] lavfi/vf_deinterlace_qsv: set output frame durations
Anton Khirnov
git at videolan.org
Thu Oct 13 11:21:35 EEST 2022
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Oct 11 10:47:42 2022 +0200| [d1526f4dacca42a5065b140d2e0058017e0e0049] | committer: Anton Khirnov
lavfi/vf_deinterlace_qsv: set output frame durations
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1526f4dacca42a5065b140d2e0058017e0e0049
---
libavfilter/vf_deinterlace_qsv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c
index 3065d6ac95..98ed7283ad 100644
--- a/libavfilter/vf_deinterlace_qsv.c
+++ b/libavfilter/vf_deinterlace_qsv.c
@@ -516,6 +516,11 @@ static int process_frame(AVFilterContext *ctx, const AVFrame *in,
out->pts++;
s->last_pts = out->pts;
+ if (outlink->frame_rate.num && outlink->frame_rate.den)
+ out->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
+ else
+ out->duration = 0;
+
ret = ff_filter_frame(outlink, out);
if (ret < 0)
return ret;
More information about the ffmpeg-cvslog
mailing list