summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/controls.h4
-rw-r--r--src/libcamera/controls.cpp1
-rw-r--r--src/libcamera/device_enumerator_udev.cpp3
3 files changed, 5 insertions, 3 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 56ee8280..2a665712 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -176,8 +176,8 @@ public:
private:
ControlType type_ : 8;
- bool isArray_ : 1;
- std::size_t numElements_ : 16;
+ bool isArray_;
+ std::size_t numElements_ : 32;
union {
uint64_t value_;
void *storage_;
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index fefd292b..25684474 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -86,6 +86,7 @@ static constexpr size_t ControlValueSize[] = {
* \brief Abstract type representing the value of a control
*/
+/** \todo Revisit the ControlValue layout when stabilizing the ABI */
static_assert(sizeof(ControlValue) == 16, "Invalid size of ControlValue class");
/**
diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index 87638c59..f5a482e3 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -90,7 +90,8 @@ int DeviceEnumeratorUdev::addUdevDevice(struct udev_device *dev)
return ret;
}
- addDevice(media);
+ if (!ret)
+ addDevice(media);
return 0;
}