mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
msdk: don't fall back to the default device
Ohterwise when user set a wrong device, the warning message doesn't get printed if user doesn't set a right debug level in the environment, this behavior might mislead user that the wrong device is being used. This fixed https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1567 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2138>
This commit is contained in:
parent
d67dcb2227
commit
39538adfd6
1 changed files with 4 additions and 5 deletions
|
@ -87,20 +87,19 @@ get_device_id (void)
|
|||
drmVersionPtr drm_version = drmGetVersion (fd);
|
||||
|
||||
if (!drm_version || strncmp (drm_version->name, "i915", 4)) {
|
||||
GST_WARNING ("The specified device isn't an Intel device, "
|
||||
"use the default device instead");
|
||||
GST_ERROR ("The specified device isn't an Intel device");
|
||||
drmFreeVersion (drm_version);
|
||||
close (fd);
|
||||
fd = -1;
|
||||
} else {
|
||||
GST_DEBUG ("Opened the specified drm device %s", user_choice);
|
||||
drmFreeVersion (drm_version);
|
||||
return fd;
|
||||
}
|
||||
} else {
|
||||
GST_WARNING ("The specified device isn't a valid drm device, "
|
||||
"use the default device instead");
|
||||
GST_ERROR ("The specified device isn't a valid drm device");
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
client = g_udev_client_new (NULL);
|
||||
|
|
Loading…
Reference in a new issue