pixfmt-test: fix VIDIOC_G_STD call for webcams
Commit Message
From: Márton Németh <nm127@freemail.hu>
Webcams may return -1 and errno=EINVAL when there is no standard which
they support. Handle this case in pixfmt-test.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -1741,8 +1741,10 @@
/* Errors ignored. */
}
+ /* Webcams may not support any standard at all, see
+ http://v4l2spec.bytesex.org/spec/x448.htm for details */
if (-1 == xioctl (dev_fd, VIDIOC_G_STD, &std_id))
- errno_exit ("VIDIOC_G_STD");
+ std_id = 0;
}
static void