diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-12-01 15:42:15 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2020-12-02 11:23:18 +0100 |
commit | c268e4f2e8dd45d3538489fa164a043cd25b0453 (patch) | |
tree | 5073e77fe34d5ff41fe1614d0403f9bd8573d235 /src/qcam/assets/feathericons/search.svg | |
parent | 5815bd0397bc63772642820a3c296b2c5fd7c791 (diff) |
android: camera_mode: Reserve 'data' vectors
The CameraDevice::getStaticMetadata() function populates the
entries for Android's static metadata by walking the ControlInfo
supported values reported by the libcamera pipeline.
The number of entries to be passed to Android is computed using the
vector's size which is initialized at vector creation time to the
maximum number of available entries.
In order to report the correct number of metadata do not create the
vector with the largest possible number of elements but only reserve
space for them using std::vector::reserve() which does not modify the
vector's size.
This patch fixes cros_camera_test:
Camera3DeviceTest/Camera3DeviceDefaultSettings.ConstructDefaultSettings/1
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/qcam/assets/feathericons/search.svg')
0 files changed, 0 insertions, 0 deletions