From e85321130e9755692e3e8f10335478a1c9acb5bf Mon Sep 17 00:00:00 2001 From: TinyOh Date: Thu, 7 Mar 2019 13:36:06 +0800 Subject: [PATCH] fix(uvc): TK1 ioctl call twice. --- src/mynteye/uvc/linux/uvc-v4l2.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mynteye/uvc/linux/uvc-v4l2.cc b/src/mynteye/uvc/linux/uvc-v4l2.cc index 166be56..8db4629 100755 --- a/src/mynteye/uvc/linux/uvc-v4l2.cc +++ b/src/mynteye/uvc/linux/uvc-v4l2.cc @@ -330,6 +330,9 @@ struct device { for (int i = 0; i < 10; ++i) { if (xioctl(fd, VIDIOC_STREAMON, &type) < 0) { std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } else { + is_capturing = true; + return; } } if (xioctl(fd, VIDIOC_STREAMON, &type) < 0)