mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
v4l2: handle ENOTTY
Instead of erroring out, go to the next format when enumerating frame size or frame interval. See #3325
This commit is contained in:
parent
4137ff656a
commit
42a099381b
1 changed files with 2 additions and 2 deletions
|
|
@ -627,7 +627,7 @@ spa_v4l2_enum_format(struct impl *this, int seq,
|
||||||
}
|
}
|
||||||
do_frmsize:
|
do_frmsize:
|
||||||
if ((res = xioctl(dev->fd, VIDIOC_ENUM_FRAMESIZES, &port->frmsize)) < 0) {
|
if ((res = xioctl(dev->fd, VIDIOC_ENUM_FRAMESIZES, &port->frmsize)) < 0) {
|
||||||
if (errno == EINVAL)
|
if (errno == EINVAL || errno == ENOTTY)
|
||||||
goto next_fmtdesc;
|
goto next_fmtdesc;
|
||||||
|
|
||||||
res = -errno;
|
res = -errno;
|
||||||
|
|
@ -745,7 +745,7 @@ spa_v4l2_enum_format(struct impl *this, int seq,
|
||||||
while (true) {
|
while (true) {
|
||||||
if ((res = xioctl(dev->fd, VIDIOC_ENUM_FRAMEINTERVALS, &port->frmival)) < 0) {
|
if ((res = xioctl(dev->fd, VIDIOC_ENUM_FRAMEINTERVALS, &port->frmival)) < 0) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
if (errno == EINVAL) {
|
if (errno == EINVAL || errno == ENOTTY) {
|
||||||
port->frmsize.index++;
|
port->frmsize.index++;
|
||||||
port->next_frmsize = true;
|
port->next_frmsize = true;
|
||||||
if (port->frmival.index == 0)
|
if (port->frmival.index == 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue