mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
libs: display: drm: don't fallback to default device if explicitly specified device can't load/init
Otherwise user will be misled that the specified device is using This fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/305 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/422>
This commit is contained in:
parent
993d46bb2f
commit
0193751ce8
1 changed files with 6 additions and 6 deletions
|
@ -350,15 +350,15 @@ gst_vaapi_display_drm_new (const gchar * device_path)
|
|||
} else {
|
||||
const gchar *user_choice = g_getenv ("GST_VAAPI_DRM_DEVICE");
|
||||
|
||||
if (user_choice && g_str_has_prefix (user_choice, "/dev/dri/")) {
|
||||
if (user_choice) {
|
||||
device_paths[num_types] = (gpointer) user_choice;
|
||||
types[num_types++] = 0;
|
||||
} else {
|
||||
device_paths[num_types] = (gpointer) device_path;
|
||||
types[num_types++] = DRM_DEVICE_RENDERNODES;
|
||||
device_paths[num_types] = (gpointer) device_path;
|
||||
types[num_types++] = DRM_DEVICE_LEGACY;
|
||||
}
|
||||
|
||||
device_paths[num_types] = (gpointer) device_path;
|
||||
types[num_types++] = DRM_DEVICE_RENDERNODES;
|
||||
device_paths[num_types] = (gpointer) device_path;
|
||||
types[num_types++] = DRM_DEVICE_LEGACY;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_types; i++) {
|
||||
|
|
Loading…
Reference in a new issue