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:
@@ -517,6 +517,8 @@ int CameraDevice::open(const hw_module_t *hardwareModule)
|
||||
|
||||
void CameraDevice::close()
|
||||
{
|
||||
streams_.clear();
|
||||
|
||||
camera_->stop();
|
||||
camera_->release();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user