diff options
| author | Mansoor Aftab <maftab@codeaurora.org> | 2014-12-11 17:55:57 -0800 |
|---|---|---|
| committer | Ali B <abittin@gmail.com> | 2018-06-17 19:19:52 +0300 |
| commit | 0ae31fc8fe6b648732c70eace2ff356d8df13972 (patch) | |
| tree | 1b71009c4f43591dd92ce8a9f30e7cdf334e3cb9 | |
| parent | 91b6970d183119d918b7210b09145cd2a03c3988 (diff) | |
Camera3: Avoid starting streams twice
The start method of some streams
(most notably the metadata) could be
called twice. This scenario should be
handled by returning immediatly and
avoiding the initialization of new
threads and resources.
This change is authored by Emilian Peev
<epeevs@codeaurora.org>
Bug: 18258028
Bug: 17912331
Change-Id: Ife6613bdca069bc63193802e0bb88273e63998f9
Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com>
| -rwxr-xr-x | camera/QCamera2/HAL3/QCamera3Channel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3Channel.cpp b/camera/QCamera2/HAL3/QCamera3Channel.cpp index 9e18740..dccbdeb 100755 --- a/camera/QCamera2/HAL3/QCamera3Channel.cpp +++ b/camera/QCamera2/HAL3/QCamera3Channel.cpp @@ -246,6 +246,11 @@ int32_t QCamera3Channel::start() return NO_INIT; } + if(m_bIsActive) { + ALOGD("%s: Attempt to start active channel", __func__); + return rc; + } + for (int i = 0; i < m_numStreams; i++) { if (mStreams[i] != NULL) { mStreams[i]->start(); |
