mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
v4l2: make gst_v4l2_fill_lists() adapt to kernel 3.3+
When do v4l2_ioctl() with VIDIOC_ENUMINPUT fails on some devices, kernels before 3.3.0 return EINVAL, but newer kernels return ENOTTY. This patch make those devices work well on kernel 3.3+. Related kernel commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=07d106d0a33d6063d2061305903deb02489eba20 Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Rui Wang <wangr@lemote.com> Signed-off-by: Jie Chen <chenj@lemote.com>
This commit is contained in:
parent
bce47066ca
commit
05d4f81834
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
|
|||
|
||||
input.index = n;
|
||||
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMINPUT, &input) < 0) {
|
||||
if (errno == EINVAL)
|
||||
if (errno == EINVAL || errno == ENOTTY)
|
||||
break; /* end of enumeration */
|
||||
else {
|
||||
GST_ELEMENT_ERROR (e, RESOURCE, SETTINGS,
|
||||
|
|
Loading…
Reference in a new issue