libcamera: stream: Initialise pixelFormat in StreamConfiguration()
To avoid depending on unitialised values, set the pixelFormat field of the StreamConfiguration class to 0 in the constructor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -289,7 +289,7 @@ SizeRange StreamFormats::range(unsigned int pixelformat) const
|
||||
* handlers provied StreamFormats.
|
||||
*/
|
||||
StreamConfiguration::StreamConfiguration()
|
||||
: memoryType(InternalMemory), stream_(nullptr)
|
||||
: pixelFormat(0), memoryType(InternalMemory), stream_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -297,7 +297,8 @@ StreamConfiguration::StreamConfiguration()
|
||||
* \brief Construct a configuration with stream formats
|
||||
*/
|
||||
StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
|
||||
: memoryType(InternalMemory), stream_(nullptr), formats_(formats)
|
||||
: pixelFormat(0), memoryType(InternalMemory), stream_(nullptr),
|
||||
formats_(formats)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user