android: CameraDevice: Deny if the streams is empty
This checks if the number of streams is zero on configuration and then returns -EINVAL. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
7d78798338
commit
d13462f3d0
1 changed files with 5 additions and 0 deletions
|
@ -1554,6 +1554,11 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
|
||||||
running_ = false;
|
running_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stream_list->num_streams == 0) {
|
||||||
|
LOG(HAL, Error) << "No streams in configuration";
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate an empty configuration, and construct a StreamConfiguration
|
* Generate an empty configuration, and construct a StreamConfiguration
|
||||||
* for each camera3_stream to add to it.
|
* for each camera3_stream to add to it.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue