summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-04 07:58:38 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-07 14:14:13 +0200
commit618b5512a8113bcc785ff57afaf7c77e6c489f3b (patch)
tree9727b1828f661629fe49913e70f604200906fd13 /src
parenta0c31b2ca39fdf06364553194ce725c4912265b3 (diff)
libcamera: control_serializer: Initialize serial_
The ControlSerializer::serial_ member variable isn't initialized. Add a constructor to the class to initialize it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/control_serializer.cpp5
-rw-r--r--src/libcamera/include/control_serializer.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
index b787655e..a5d6d875 100644
--- a/src/libcamera/control_serializer.cpp
+++ b/src/libcamera/control_serializer.cpp
@@ -84,6 +84,11 @@ static constexpr size_t ControlValueSize[] = {
* proceed with care to avoid stale references.
*/
+ControlSerializer::ControlSerializer()
+ : serial_(0)
+{
+}
+
/**
* \brief Reset the serializer
*
diff --git a/src/libcamera/include/control_serializer.h b/src/libcamera/include/control_serializer.h
index bb3cb8e7..55259913 100644
--- a/src/libcamera/include/control_serializer.h
+++ b/src/libcamera/include/control_serializer.h
@@ -20,6 +20,8 @@ class ByteStreamBuffer;
class ControlSerializer
{
public:
+ ControlSerializer();
+
void reset();
static size_t binarySize(const ControlInfoMap &info);