diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 56ee8280b..2a6657128 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 fefd292b2..256844747 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 87638c597..f5a482e35 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; }