diff mbox

[FFmpeg-devel,3/3] avutil/hwcontext_vaapi: move kernel_driver into CONFIG_LIBDRM

Message ID 20190627073805.13322-3-lq@chinaffmpeg.org
State Accepted
Commit 1498e39439202b7b28f516771a59bca90be7150f
Headers show

Commit Message

Liu Steven June 27, 2019, 7:38 a.m. UTC
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavutil/hwcontext_vaapi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Zhong Li June 27, 2019, 1:31 p.m. UTC | #1
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Steven Liu

> Sent: Thursday, June 27, 2019 3:38 PM

> To: ffmpeg-devel@ffmpeg.org

> Cc: Steven Liu <lq@chinaffmpeg.org>

> Subject: [FFmpeg-devel] [PATCH 3/3] avutil/hwcontext_vaapi: move

> kernel_driver into CONFIG_LIBDRM

> 

> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>

> ---

>  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);

> --

> 2.17.2 (Apple Git-113)


LGTM
diff mbox

Patch

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);