[FFmpeg-devel] [PATCH v2 08/12] lavfi/qsvvpp: set right mfxFrameInfo for frames in dynamic frame pools

Xiang, Haihao haihao.xiang at intel.com
Wed Dec 20 09:10:46 EET 2023


From: Haihao Xiang <haihao.xiang at intel.com>

Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
---
 libavfilter/qsvvpp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
index 5cdba7d54a..d09140d89b 100644
--- a/libavfilter/qsvvpp.c
+++ b/libavfilter/qsvvpp.c
@@ -307,7 +307,7 @@ static int fill_frameinfo_by_link(mfxFrameInfo *frameinfo, AVFilterLink *link)
 
         frames_ctx   = (AVHWFramesContext *)link->hw_frames_ctx->data;
         frames_hwctx = frames_ctx->hwctx;
-        *frameinfo   = frames_hwctx->surfaces[0].Info;
+        *frameinfo   = frames_hwctx->nb_surfaces ? frames_hwctx->surfaces[0].Info : *frames_hwctx->info;
     } else {
         pix_fmt = link->format;
         desc = av_pix_fmt_desc_get(pix_fmt);
-- 
2.34.1



More information about the ffmpeg-devel mailing list