From 4d3f6850cac63145b119ffe60cfb197e5d7e77cd Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 5 Jul 2012 18:02:27 +0200 Subject: [PATCH] v4l2: handle return value -ENOTTY for unimplemented VIDIOC_G_PARM Newer kernels return -ENOTTY, older kernels return -EINVAL if the ioctl is not implemented. With this patch, GStreamer handles both cases. https://bugzilla.gnome.org/show_bug.cgi?id=698825 --- sys/v4l2/gstv4l2object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 1479b4185b..dd9f79b4a0 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -2461,7 +2461,7 @@ invalid_pixelformat: get_parm_failed: { /* it's possible that this call is not supported */ - if (errno != EINVAL) { + if (errno != EINVAL && errno != ENOTTY) { GST_ELEMENT_WARNING (v4l2object->element, RESOURCE, SETTINGS, (_("Could not get parameters on device '%s'"), v4l2object->videodev), GST_ERROR_SYSTEM);