From 42a099381b85032f43ce6352c677f488eee9dccd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 4 Jul 2023 11:36:37 +0200 Subject: [PATCH] v4l2: handle ENOTTY Instead of erroring out, go to the next format when enumerating frame size or frame interval. See #3325 --- spa/plugins/v4l2/v4l2-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index d00cfb6f7..8647ca9e3 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -627,7 +627,7 @@ spa_v4l2_enum_format(struct impl *this, int seq, } do_frmsize: if ((res = xioctl(dev->fd, VIDIOC_ENUM_FRAMESIZES, &port->frmsize)) < 0) { - if (errno == EINVAL) + if (errno == EINVAL || errno == ENOTTY) goto next_fmtdesc; res = -errno; @@ -745,7 +745,7 @@ spa_v4l2_enum_format(struct impl *this, int seq, while (true) { if ((res = xioctl(dev->fd, VIDIOC_ENUM_FRAMEINTERVALS, &port->frmival)) < 0) { res = -errno; - if (errno == EINVAL) { + if (errno == EINVAL || errno == ENOTTY) { port->frmsize.index++; port->next_frmsize = true; if (port->frmival.index == 0)