mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
v4l2: check device caps
If V4L2_CAP_DEVICE_CAPS is set, device_caps must be checked for the V4L2_CAP_VIDEO_CAPTURE flag instead of capabilities.
This commit is contained in:
parent
187b6d4bf9
commit
e38cba4e13
1 changed files with 3 additions and 1 deletions
|
|
@ -83,7 +83,9 @@ static int spa_v4l2_open(struct impl *this)
|
|||
return -err;
|
||||
}
|
||||
|
||||
if ((port->cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0) {
|
||||
if ((port->cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0 ||
|
||||
((port->cap.capabilities & V4L2_CAP_DEVICE_CAPS) &&
|
||||
(port->cap.device_caps & V4L2_CAP_VIDEO_CAPTURE) == 0)) {
|
||||
spa_log_error(port->log, "v4l2: %s is no video capture device", props->device);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue