]> git.sesse.net Git - ffmpeg/commitdiff
avutil/hwcontext_vaapi: move kernel_driver into CONFIG_LIBDRM
authorSteven Liu <lq@chinaffmpeg.org>
Thu, 11 Jul 2019 01:34:57 +0000 (09:34 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Thu, 11 Jul 2019 01:34:57 +0000 (09:34 +0800)
Reviewed-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
libavutil/hwcontext_vaapi.c

index 4227c3c09031906a340085b931acce840a1b7e9e..cf117640f283d5c857672051327afb5e180304f8 100644 (file)
@@ -1514,10 +1514,12 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device,
                 break;
             }
         } else {
-            const AVDictionaryEntry *kernel_driver;
             char path[64];
             int n, max_devices = 8;
+#if CONFIG_LIBDRM
+            const AVDictionaryEntry *kernel_driver;
             kernel_driver = av_dict_get(opts, "kernel_driver", NULL, 0);
+#endif
             for (n = 0; n < max_devices; n++) {
                 snprintf(path, sizeof(path),
                          "/dev/dri/renderD%d", 128 + n);