android: camera_device: Clear streams_ at stop time
When the CameraDevice is stopped, we need to clear the vector of CameraStream instances to make sure they get deleted and all the resources they have acquired get released. Reviewed-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
35f726d4da
commit
6c4999e6a4
1 changed files with 2 additions and 0 deletions
|
@ -517,6 +517,8 @@ int CameraDevice::open(const hw_module_t *hardwareModule)
|
||||||
|
|
||||||
void CameraDevice::close()
|
void CameraDevice::close()
|
||||||
{
|
{
|
||||||
|
streams_.clear();
|
||||||
|
|
||||||
camera_->stop();
|
camera_->stop();
|
||||||
camera_->release();
|
camera_->release();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue