[FFmpeg-devel] [PATCH v2 2/4] hwcontext_opencl: dump the device name when can't match device type.

Jun Zhao mypopydev at gmail.com
Thu Jun 21 14:45:44 EEST 2018


afther the change, we can get more detail debug message like:
"Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz" does not match device type "gpu".

Signed-off-by: Jun Zhao <mypopydev at gmail.com>
---
 libavutil/hwcontext_opencl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
index f6cceef..9e96e96 100644
--- a/libavutil/hwcontext_opencl.c
+++ b/libavutil/hwcontext_opencl.c
@@ -430,7 +430,8 @@ static int opencl_filter_device(AVHWDeviceContext *hwdev,
         }
 
         if (!(device_type & match_type)) {
-            av_log(hwdev, AV_LOG_DEBUG, "device_type does not match.\n");
+            av_log(hwdev, AV_LOG_DEBUG, "\"%s\" does not match device type \"%s\".\n",
+                   device_name, param->value);
             return 1;
         }
     }
-- 
2.7.4



More information about the ffmpeg-devel mailing list