summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2020-10-07 12:22:38 +0300
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-12 16:13:57 +0100
commit503d61fc83d8c3875c1bd75a6ff11a77970ee764 (patch)
tree67c952e24f14d66b71c29230e90f49e645dc98d5
parent9183d218429c0fedb8be068170016a1c31cd3bf0 (diff)
cam: fix use of uninitialized field
Initialize last_ to 0 to avoid uninitialized use. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/cam/capture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp
index 8c8faa4b..7580f798 100644
--- a/src/cam/capture.cpp
+++ b/src/cam/capture.cpp
@@ -17,7 +17,7 @@ using namespace libcamera;
Capture::Capture(std::shared_ptr<Camera> camera, CameraConfiguration *config,
EventLoop *loop)
- : camera_(camera), config_(config), writer_(nullptr), loop_(loop),
+ : camera_(camera), config_(config), writer_(nullptr), last_(0), loop_(loop),
captureCount_(0), captureLimit_(0)
{
}