src: fixed camera can't be used on kernel 4.16+

This commit is contained in:
Osenberg 2019-07-26 18:45:11 +08:00
parent 9775903fb1
commit cb9c4fae74

View File

@ -197,6 +197,7 @@ struct device {
} }
} }
} else { } else {
throw_error() << dev_name + " is no video capture device";
} // Errors ignored } // Errors ignored
} }
@ -474,7 +475,8 @@ std::vector<std::shared_ptr<device>> query_devices(
} }
try { try {
devices.push_back(std::make_shared<device>(context, name)); auto one_device = std::make_shared<device>(context, name);
devices.push_back(one_device);
} catch (const std::exception &e) { } catch (const std::exception &e) {
VLOG(2) << "Not a USB video device: " << e.what(); VLOG(2) << "Not a USB video device: " << e.what();
} }