v4l2: handle ENODATA return value for VIDIOC_ENUMSTD
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 18 Oct 2012 08:37:35 +0000 (10:37 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 25 Apr 2013 13:40:59 +0000 (15:40 +0200)
In kernel v3.7-rc1, VIDIOC_ENUMSTD returns ENODATA if the current input
does not support the STD API.

https://bugzilla.gnome.org/show_bug.cgi?id=698827

sys/v4l2/v4l2_calls.c

index afa2f13..e9201a2 100644 (file)
@@ -204,7 +204,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
     standard.index = n;
 
     if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMSTD, &standard) < 0) {
-      if (errno == EINVAL || errno == ENOTTY)
+      if (errno == EINVAL || errno == ENOTTY || errno == ENODATA)
         break;                  /* end of enumeration */
       else {
         GST_ELEMENT_ERROR (e, RESOURCE, SETTINGS,