libcamera: camera: fix bug in error check for streamConfiguration()

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: 65ea2422d2 ("libcamera: camera: extend camera object to support configuration of streams")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Niklas Söderlund
2019-02-26 02:20:51 +01:00
parent 374c102073
commit 9aceed70a2

View File

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