diff options
author | Zhijun He <zhijunhe@google.com> | 2013-06-06 11:12:05 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-06-06 11:12:05 -0700 |
commit | 9490a96eab4b25b23777b297de75186dfb932577 (patch) | |
tree | 4744032179138530b52b36bd8a9735af1210a5de /services | |
parent | 3f944f46a6a35034a7f5e0058134df9ebfc41e43 (diff) | |
parent | 1d263b89bd1c5d73389f53976e104dd6b088ab6e (diff) | |
download | frameworks_av-9490a96eab4b25b23777b297de75186dfb932577.zip frameworks_av-9490a96eab4b25b23777b297de75186dfb932577.tar.gz frameworks_av-9490a96eab4b25b23777b297de75186dfb932577.tar.bz2 |
am 1d263b89: am 62a8f67f: camera2/3: Add protection to callback processing call
* commit '1d263b89bd1c5d73389f53976e104dd6b088ab6e':
camera2/3: Add protection to callback processing call
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/camera2/CallbackProcessor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/camera2/CallbackProcessor.cpp b/services/camera/libcameraservice/camera2/CallbackProcessor.cpp index ff12a0a..2dbb6fd 100644 --- a/services/camera/libcameraservice/camera2/CallbackProcessor.cpp +++ b/services/camera/libcameraservice/camera2/CallbackProcessor.cpp @@ -216,6 +216,13 @@ bool CallbackProcessor::threadLoop() { } do { + Mutex::Autolock l(mInputMutex); + if (mCallbackStreamId == NO_STREAM) { + ALOGV("%s: Camera %d:No stream is available" + , __FUNCTION__, mId); + break; + } + sp<Camera2Client> client = mClient.promote(); if (client == 0) { res = discardNewCallback(); |