summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/foundation
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-12-07 18:45:35 -0800
committerSteve Kondik <steve@cyngn.com>2015-12-07 18:45:35 -0800
commit697a7ab8c538ca84a92b605e50824da1cbf9b466 (patch)
treefe32b5c0b8e0fa115cd6358c5428b8a48e285dec /media/libstagefright/foundation
parent7f8512331f105565054202486fa0a6094ad693c1 (diff)
parent5dc9ffe50ef517591b8ffad66c7e4d6ec82b8b4b (diff)
downloadframeworks_av-697a7ab8c538ca84a92b605e50824da1cbf9b466.zip
frameworks_av-697a7ab8c538ca84a92b605e50824da1cbf9b466.tar.gz
frameworks_av-697a7ab8c538ca84a92b605e50824da1cbf9b466.tar.bz2
Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/frameworks/av into cm-13.0
Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
Diffstat (limited to 'media/libstagefright/foundation')
-rw-r--r--media/libstagefright/foundation/ALooper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp
index 90b5f68..9921636 100644
--- a/media/libstagefright/foundation/ALooper.cpp
+++ b/media/libstagefright/foundation/ALooper.cpp
@@ -151,6 +151,10 @@ status_t ALooper::stop() {
}
mQueueChangedCondition.signal();
+ {
+ Mutex::Autolock autoLock(mRepliesLock);
+ mRepliesCondition.broadcast();
+ }
if (!runningLocally && !thread->isCurrentThread()) {
// If not running locally and this thread _is_ the looper thread,
@@ -234,6 +238,12 @@ status_t ALooper::awaitResponse(const sp<AReplyToken> &replyToken, sp<AMessage>
Mutex::Autolock autoLock(mRepliesLock);
CHECK(replyToken != NULL);
while (!replyToken->retrieveReply(response)) {
+ {
+ Mutex::Autolock autoLock(mLock);
+ if (mThread == NULL) {
+ return -ENOENT;
+ }
+ }
mRepliesCondition.wait(mRepliesLock);
}
return OK;