[libcamera-devel] [PATCH 01/10] libcamera: stream: Initialize stride and bufferCount

Niklas Söderlund niklas.soderlund at ragnatech.se
Tue Jun 2 03:39:00 CEST 2020


The two public unsigned integer fields of StreamConfiguration, stride
and bufferCount where not initialized, fix this to match other members
being initialized to their 'zero' state.

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/libcamera/stream.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index f34348f2aea022a0..3c4f64daf69d68a4 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -279,7 +279,7 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const
  * handlers provied StreamFormats.
  */
 StreamConfiguration::StreamConfiguration()
-	: pixelFormat(0), stream_(nullptr)
+	: pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr)
 {
 }
 
@@ -287,7 +287,8 @@ StreamConfiguration::StreamConfiguration()
  * \brief Construct a configuration with stream formats
  */
 StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
-	: pixelFormat(0), stream_(nullptr), formats_(formats)
+	: pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr),
+	  formats_(formats)
 {
 }
 
-- 
2.26.2



More information about the libcamera-devel mailing list