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

Jacopo Mondi jacopo at jmondi.org
Wed Feb 27 13:52:36 CET 2019


Hi Niklas,

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.

Sorry, forgot to reply. Please add

Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
  j
>
> 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
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20190227/f98fd8cb/attachment.sig>


More information about the libcamera-devel mailing list