fix(uvc): TK1 ioctl call twice.

This commit is contained in:
TinyOh 2019-03-07 13:36:06 +08:00
parent dc0a259007
commit e85321130e

View File

@ -330,6 +330,9 @@ struct device {
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
if (xioctl(fd, VIDIOC_STREAMON, &type) < 0) { if (xioctl(fd, VIDIOC_STREAMON, &type) < 0) {
std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::this_thread::sleep_for(std::chrono::milliseconds(100));
} else {
is_capturing = true;
return;
} }
} }
if (xioctl(fd, VIDIOC_STREAMON, &type) < 0) if (xioctl(fd, VIDIOC_STREAMON, &type) < 0)