From 523134587ad86959ad03bbbabcca841d64d9ed8c Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Thu, 7 Aug 2025 22:48:04 +0800 Subject: [PATCH] lavu/hwcontext_vaapi: drop a redundant check vaapi_get_image_format() will be called in vaapi_map_frame(). So it's a double check, drop it to avoid redundancy. Signed-off-by: nyanmisaka --- libavutil/hwcontext_vaapi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 7c243ec1ef..51af22a607 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -1019,12 +1019,6 @@ static int vaapi_map_to_memory(AVHWFramesContext *hwfc, AVFrame *dst, { int err; - if (dst->format != AV_PIX_FMT_NONE) { - err = vaapi_get_image_format(hwfc->device_ctx, dst->format, NULL); - if (err < 0) - return err; - } - err = vaapi_map_frame(hwfc, dst, src, flags); if (err) return err;