1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lavfi/vf_vpp_qsv: fix duration in pass-through mode

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
This commit is contained in:
Haihao Xiang 2023-07-24 10:36:51 +08:00
parent e63d9ba007
commit 567e78b283

View File

@ -582,6 +582,11 @@ static int activate(AVFilterContext *ctx)
if (in->pts != AV_NOPTS_VALUE)
in->pts = av_rescale_q(in->pts, inlink->time_base, outlink->time_base);
if (outlink->frame_rate.num && outlink->frame_rate.den)
in->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
else
in->duration = 0;
ret = ff_filter_frame(outlink, in);
if (ret < 0)
return ret;