aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Stratiienko <r.stratiienko@gmail.com>2021-11-09 01:47:31 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-11-09 01:47:31 +0000
commit309f289e655f5ddd5af33248a995ad1031b16d2c (patch)
treee5015fe824fcdf1cc50eb021dd3168220dafa508
parent892613869887ce2ad9b39364631281ca57f5939d (diff)
parent95568fdc852a42a198e709ee44610833f360e9cb (diff)
downloadv4l2_codec2-309f289e655f5ddd5af33248a995ad1031b16d2c.tar.gz
V4L2Device: Increase max /dev/video device index from 9 to 15 am: 95568fdc85
Original change: https://android-review.googlesource.com/c/platform/external/v4l2_codec2/+/1882080 Change-Id: I5a40a888f5e55471dcd9ee1a62e6e3e206aaf13c
-rw-r--r--common/V4L2Device.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/V4L2Device.cpp b/common/V4L2Device.cpp
index 1efb4e3..68a9dca 100644
--- a/common/V4L2Device.cpp
+++ b/common/V4L2Device.cpp
@@ -1986,8 +1986,8 @@ void V4L2Device::enumerateDevicesForType(Type type) {
candidatePaths.push_back(devicePattern);
// We are sandboxed, so we can't query directory contents to check which devices are actually
- // available. Try to open the first 10; if not present, we will just fail to open immediately.
- for (int i = 0; i < 10; ++i) {
+ // available. Try to open the first 16; if not present, we will just fail to open immediately.
+ for (int i = 0; i < 16; ++i) {
candidatePaths.push_back(base::StringPrintf("%s%d", devicePattern.c_str(), i));
}