mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +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/4851>
This commit is contained in:
parent
4ab685c2a3
commit
cccf28fec1
1 changed files with 4 additions and 0 deletions
|
@ -307,6 +307,10 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
|
|||
} else {
|
||||
GST_WARNING_OBJECT (e, "Failed querying control %d on device '%s'. "
|
||||
"(%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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue