mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-04 13:45:52 +00:00
v4l2src: fix spurious SOURCE_CHANGED error-level log messages
They're harmless, and some drivers at least return EINVAL instead of ENOTTY for unsupported events (here: uvcvideo). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/955>
This commit is contained in:
parent
61d4dd0b9b
commit
63c1e2ed60
|
@ -1257,10 +1257,15 @@ gst_v4l2_subscribe_event (GstV4l2Object * v4l2object, guint32 event, guint32 id)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
failed:
|
failed:
|
||||||
{
|
{
|
||||||
if (errno != ENOTTY)
|
if (errno == ENOTTY || errno == EINVAL) {
|
||||||
|
GST_DEBUG_OBJECT (v4l2object->dbg_obj,
|
||||||
|
"Cannot subscribe to '%s' event: %s",
|
||||||
|
gst_v4l2_event_to_string (event), "not supported");
|
||||||
|
} else {
|
||||||
GST_ERROR_OBJECT (v4l2object->dbg_obj,
|
GST_ERROR_OBJECT (v4l2object->dbg_obj,
|
||||||
"Cannot subscribe to '%s' event: %s",
|
"Cannot subscribe to '%s' event: %s",
|
||||||
gst_v4l2_event_to_string (event), g_strerror (errno));
|
gst_v4l2_event_to_string (event), g_strerror (errno));
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue