From cb9c4fae74f70e027cc4a4d197814ddec5319a4c Mon Sep 17 00:00:00 2001 From: Osenberg Date: Fri, 26 Jul 2019 18:45:11 +0800 Subject: [PATCH] src: fixed camera can't be used on kernel 4.16+ --- src/mynteye/uvc/linux/uvc-v4l2.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mynteye/uvc/linux/uvc-v4l2.cc b/src/mynteye/uvc/linux/uvc-v4l2.cc index 8db4629..ec8398a 100755 --- a/src/mynteye/uvc/linux/uvc-v4l2.cc +++ b/src/mynteye/uvc/linux/uvc-v4l2.cc @@ -197,6 +197,7 @@ struct device { } } } else { + throw_error() << dev_name + " is no video capture device"; } // Errors ignored } @@ -474,7 +475,8 @@ std::vector> query_devices( } try { - devices.push_back(std::make_shared(context, name)); + auto one_device = std::make_shared(context, name); + devices.push_back(one_device); } catch (const std::exception &e) { VLOG(2) << "Not a USB video device: " << e.what(); }