mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
v4l2: guard use of ENODATA with #ifdef
Not all systems with v4l have ENODATA defined, so check that we have it before attempting to use it. https://bugzilla.gnome.org/show_bug.cgi?id=722953
This commit is contained in:
parent
8054cd5df3
commit
a46f667853
1 changed files with 5 additions and 1 deletions
|
@ -205,8 +205,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
|
|||
standard.index = n;
|
||||
|
||||
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMSTD, &standard) < 0) {
|
||||
if (errno == EINVAL || errno == ENOTTY || errno == ENODATA)
|
||||
if (errno == EINVAL || errno == ENOTTY)
|
||||
break; /* end of enumeration */
|
||||
#ifdef ENODATA
|
||||
else if (errno == ENODATA)
|
||||
break; /* end of enumeration, as of Linux 3.7-rc1 */
|
||||
#endif
|
||||
else {
|
||||
GST_ELEMENT_ERROR (e, RESOURCE, SETTINGS,
|
||||
(_("Failed to query norm on device '%s'."),
|
||||
|
|
Loading…
Reference in a new issue