[libcamera-devel] [PATCH 1/8] libcamera: camera: fix bug in error check for streamConfiguration()

Niklas Söderlund niklas.soderlund at ragnatech.se
Tue Feb 26 03:18:50 CET 2019


The return statement is missing altogether and an error is silently
ignored. Fix this and also update the empty map to use the correct type
for the map key.

Fixes: 65ea2422d24a3073 ("libcamera: camera: extend camera object to support configuration of streams")
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/libcamera/camera.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 1acb399c80a6fd3e..6409d10ff88b2189 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -213,7 +213,7 @@ std::map<Stream *, StreamConfiguration>
 Camera::streamConfiguration(std::vector<Stream *> &streams)
 {
 	if (disconnected_ || !streams.size())
-		std::map<unsigned int, StreamConfiguration> {};
+		return std::map<Stream *, StreamConfiguration>{};
 
 	return pipe_->streamConfiguration(this, streams);
 }
-- 
2.20.1



More information about the libcamera-devel mailing list