[FFmpeg-devel,1/7] hwcontext_vaapi: Fix condition for DRM device derivation

Submitted by Mark Thompson on March 11, 2018, 10:41 p.m.

Details

Message ID 20180311224156.23986-1-sw@jkqxz.net
State Accepted
Commit 389f4c3e0d0a26a7d3d2696017384874cf5e93fa
Headers show

Commit Message

Mark Thompson March 11, 2018, 10:41 p.m.
vaGetDisplayDRM() is required for this code to work, libdrm is not.
---
 libavutil/hwcontext_vaapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index af9a136ef0..99f76b9169 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1324,7 +1324,7 @@  static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device,
 static int vaapi_device_derive(AVHWDeviceContext *ctx,
                                AVHWDeviceContext *src_ctx, int flags)
 {
-#if CONFIG_LIBDRM
+#if HAVE_VAAPI_DRM
     if (src_ctx->type == AV_HWDEVICE_TYPE_DRM) {
         AVDRMDeviceContext *src_hwctx = src_ctx->hwctx;
         VADisplay *display;