vaapi_get_image_format() will be called in vaapi_map_frame(), so it's
redundant here. Also, NULL for VAImageFormat **image_format could be
a bit improper since the function is supposed to be used to get the
image format.

Remove vaapi_get_image_format() in vaapi_map_to_memory().

Signed-off-by: Linjie Fu <linjie...@intel.com>
---
 libavutil/hwcontext_vaapi.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 64f14de..3b0f671 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -940,12 +940,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 AVERROR(ENOSYS);
-    }
-
     err = vaapi_map_frame(hwfc, dst, src, flags);
     if (err)
         return err;
-- 
2.7.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to