summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2021-04-06 12:03:32 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2021-04-13 01:23:43 +0000
commit39538adfd6afc25fa97727cb3bad672766901360 (patch)
treebedff7b36d60cf81558f3fdc38b84ce4f6977dac /sys
parentd67dcb222754b991844ada6156f0c0b38cfb3240 (diff)
downloadgstreamer-plugins-bad-39538adfd6afc25fa97727cb3bad672766901360.tar.gz
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>
Diffstat (limited to 'sys')
-rw-r--r--sys/msdk/gstmsdkcontext.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/msdk/gstmsdkcontext.c b/sys/msdk/gstmsdkcontext.c
index df635c7ff..294b49ef5 100644
--- a/sys/msdk/gstmsdkcontext.c
+++ b/sys/msdk/gstmsdkcontext.c
@@ -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);