summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-08-05 12:53:49 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-08-06 12:57:06 +0100
commit035ee23910233eabbdaed1469f3d329d66e0ead4 (patch)
tree3d567b5ebbb75909ebdcd736808237c1bb6f6f5d /src/android
parentaf28a80647707074ed0596e2aa6d45c84b7d9f67 (diff)
android: camera_device: Initialize 'id_' field in constructor
A 'id' is passed when a new CameraDevice is constructed in order for unique identification. Failing to initialize it, will lead to the issue of garbage return value via CameraDevice::id(). Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_device.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index e96ffc55..56d0d880 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -163,7 +163,7 @@ CameraDevice::Camera3RequestDescriptor::~Camera3RequestDescriptor()
*/
CameraDevice::CameraDevice(unsigned int id, const std::shared_ptr<Camera> &camera)
- : running_(false), camera_(camera), staticMetadata_(nullptr),
+ : id_(id), running_(false), camera_(camera), staticMetadata_(nullptr),
facing_(CAMERA_FACING_FRONT), orientation_(0)
{
camera_->requestCompleted.connect(this, &CameraDevice::requestComplete);