summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2013-06-06 11:09:54 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-06-06 11:09:54 -0700
commit1d263b89bd1c5d73389f53976e104dd6b088ab6e (patch)
treedd527448872a2b422ea96076699cfdda90c2bc26 /services
parent25c8c528101360119f2aafc1871811cc1a5ad519 (diff)
parent62a8f67f33faf19d0ff815672dd19bb71dd0d650 (diff)
downloadframeworks_av-1d263b89bd1c5d73389f53976e104dd6b088ab6e.zip
frameworks_av-1d263b89bd1c5d73389f53976e104dd6b088ab6e.tar.gz
frameworks_av-1d263b89bd1c5d73389f53976e104dd6b088ab6e.tar.bz2
am 62a8f67f: camera2/3: Add protection to callback processing call
* commit '62a8f67f33faf19d0ff815672dd19bb71dd0d650': camera2/3: Add protection to callback processing call
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/camera2/CallbackProcessor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/camera2/CallbackProcessor.cpp b/services/camera/libcameraservice/camera2/CallbackProcessor.cpp
index 5fa84e0..05c0abe 100644
--- a/services/camera/libcameraservice/camera2/CallbackProcessor.cpp
+++ b/services/camera/libcameraservice/camera2/CallbackProcessor.cpp
@@ -182,6 +182,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();