diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2023-01-09 15:12:09 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2023-01-17 10:10:52 +0800 |
commit | 3763635ef40c59ce02e79efc0f117e1298a775d9 (patch) | |
tree | 1ebfc885358182b95e4d256123ec6768c8ab87a5 | |
parent | 6ce23ebaac4f36d0477da18991ef16188e52a2ad (diff) | |
download | ffmpeg-3763635ef40c59ce02e79efc0f117e1298a775d9.tar.gz |
lavfi/qsvvpp: set output frame durations
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
-rw-r--r-- | libavfilter/qsvvpp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 064b105a17..f074bf9978 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -503,6 +503,11 @@ static QSVFrame *query_frame(QSVVPPContext *s, AVFilterLink *outlink) return NULL; } + if (outlink->frame_rate.num && outlink->frame_rate.den) + out_frame->frame->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); + else + out_frame->frame->duration = 0; + out_frame->frame->width = outlink->w; out_frame->frame->height = outlink->h; out_frame->surface.Info = s->vpp_param.vpp.Out; |