From patchwork Thu Jun 27 07:38:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 13716 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7DFEE4497CF for ; Thu, 27 Jun 2019 10:43:16 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62FE568A983; Thu, 27 Jun 2019 10:43:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbg202.qq.com (smtpbg202.qq.com [184.105.206.29]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 05C4C68A720 for ; Thu, 27 Jun 2019 10:43:08 +0300 (EEST) X-QQ-mid: bizesmtp26t1561621105t08h0os0 Received: from localhost (unknown [43.247.177.226]) by esmtp10.qq.com (ESMTP) with id ; Thu, 27 Jun 2019 15:38:23 +0800 (CST) X-QQ-SSF: 01100000002000K0ZPF1B00A0000000 X-QQ-FEAT: fVZeSYFzHq0AY8XPbvuS7Vf2B8xtAC7I18FCFXQUV1D+t8oTJcybHd2vsI3yX rUi6VCicqEI45lbNNMNmkqiS1Gai2ij/rcSKxT8gx4D81vf77tWcUQVk75MdagW8DzjZxVf gbSvTQlKfxOMeE1SomeIt2fdNT8Myn5MJ9ovcVk6y8VIBGm1mJpU1nW+jPloCGq7kYnjopm a0D5C6dUfhUcM7xnTjcK5qmlC2vWVUe1pVKct6I6Qvx7NBVMn8KIG1snqMZ+EtwkHQhTTkq DA/mhmQ9EqKEbL9CK9sBn747uhx77W3LgEh7qQfUPfbjqU2Z6P92HZjVkc4oOiP93CzA== X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Thu, 27 Jun 2019 15:38:05 +0800 Message-Id: <20190627073805.13322-3-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.17.2 (Apple Git-113) In-Reply-To: <20190627073805.13322-1-lq@chinaffmpeg.org> References: <20190627073805.13322-1-lq@chinaffmpeg.org> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH 3/3] avutil/hwcontext_vaapi: move kernel_driver into CONFIG_LIBDRM X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Steven Liu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Steven Liu --- libavutil/hwcontext_vaapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 4227c3c090..cf117640f2 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -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);