mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
v4l2: Change to query only up to V4L2_CID_PRIVATE_BASE+V4L2_CID_MAX_CTRLS
Fix to prevent infinite querying. There are devices that exceed V4L2_CID_PRIVATE_BASE+V4L2_CID_MAX_CTRLS but do not return EINVAL. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4790>
This commit is contained in:
parent
513dd2c219
commit
e7cfc1f5bd
1 changed files with 4 additions and 0 deletions
|
@ -307,6 +307,10 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING_OBJECT (e, "Failed querying control %d on device '%s'. "
|
GST_WARNING_OBJECT (e, "Failed querying control %d on device '%s'. "
|
||||||
"(%d - %s)", n, v4l2object->videodev, errno, strerror (errno));
|
"(%d - %s)", n, v4l2object->videodev, errno, strerror (errno));
|
||||||
|
if (n > (V4L2_CID_PRIVATE_BASE + V4L2_CID_MAX_CTRLS)) {
|
||||||
|
GST_DEBUG_OBJECT (e, "Finish control by reaching V4L2_CID_MAX_CTRLS");
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue