From c0ebae365d3ee20dc6ed1cf71d998bf040e93149 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 16 Apr 2023 22:48:22 +0200 Subject: Find /dev/dri/card path that exists (the first one) --- src/capture/xcomposite_vaapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/capture/xcomposite_vaapi.c') diff --git a/src/capture/xcomposite_vaapi.c b/src/capture/xcomposite_vaapi.c index 3423af0..0f3ab47 100644 --- a/src/capture/xcomposite_vaapi.c +++ b/src/capture/xcomposite_vaapi.c @@ -74,7 +74,7 @@ static Window get_focused_window(Display *display, Atom net_active_window_atom) static bool drm_create_codec_context(gsr_capture_xcomposite_vaapi *cap_xcomp, AVCodecContext *video_codec_context) { AVBufferRef *device_ctx; - if(av_hwdevice_ctx_create(&device_ctx, AV_HWDEVICE_TYPE_VAAPI, "/dev/dri/renderD128", NULL, 0) < 0) { + if(av_hwdevice_ctx_create(&device_ctx, AV_HWDEVICE_TYPE_VAAPI, cap_xcomp->params.card_path, NULL, 0) < 0) { fprintf(stderr, "Error: Failed to create hardware device context\n"); return false; } -- cgit v1.2.3