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

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Feb 27 13:53:15 CET 2019


Hi Niklas,

Thank you for the patch.

On Tue, Feb 26, 2019 at 03:18:50AM +0100, Niklas Söderlund wrote:
> 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>

Oops.

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  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);
>  }

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list