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:
parent
124336329c
commit
a68cec65c1
1 changed files with 3 additions and 2 deletions
|
@ -289,7 +289,7 @@ SizeRange StreamFormats::range(unsigned int pixelformat) const
|
||||||
* handlers provied StreamFormats.
|
* handlers provied StreamFormats.
|
||||||
*/
|
*/
|
||||||
StreamConfiguration::StreamConfiguration()
|
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
|
* \brief Construct a configuration with stream formats
|
||||||
*/
|
*/
|
||||||
StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
|
StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
|
||||||
: memoryType(InternalMemory), stream_(nullptr), formats_(formats)
|
: pixelFormat(0), memoryType(InternalMemory), stream_(nullptr),
|
||||||
|
formats_(formats)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue