|
|
@@ -1561,9 +1561,10 @@ void CCamera::UpdateStatusLedOutputLocked(void)
|
|
|
|
|
|
void CCamera::SetCaptureFlashActive(bool active)
|
|
|
{
|
|
|
- ScopedCameraOperationLock operationLock(m_cameraOperationMutex);
|
|
|
+ // Indicator reference counts must always be balanced, even during long captures.
|
|
|
+ ScopedCameraOperationLock operationLock(m_cameraOperationMutex, portMAX_DELAY);
|
|
|
if (!operationLock.acquired()) return;
|
|
|
- ScopedCameraLock cameraLock(m_cameraMutex);
|
|
|
+ ScopedCameraLock cameraLock(m_cameraMutex, portMAX_DELAY);
|
|
|
if (!cameraLock.acquired()) return;
|
|
|
|
|
|
if (active)
|
|
|
@@ -1579,9 +1580,10 @@ void CCamera::SetCaptureFlashActive(bool active)
|
|
|
|
|
|
void CCamera::SetCaptureStatusLedActive(bool active)
|
|
|
{
|
|
|
- ScopedCameraOperationLock operationLock(m_cameraOperationMutex);
|
|
|
+ // Indicator reference counts must always be balanced, even during long captures.
|
|
|
+ ScopedCameraOperationLock operationLock(m_cameraOperationMutex, portMAX_DELAY);
|
|
|
if (!operationLock.acquired()) return;
|
|
|
- ScopedCameraLock cameraLock(m_cameraMutex);
|
|
|
+ ScopedCameraLock cameraLock(m_cameraMutex, portMAX_DELAY);
|
|
|
if (!cameraLock.acquired()) return;
|
|
|
|
|
|
if (active)
|