summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodec.cpp
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-10-21 13:42:59 -0700
committerRonghua Wu <ronghuawu@google.com>2015-10-22 13:42:02 -0700
commit0abb2aa4859ced9165c77324cb83d1cd94f5f20c (patch)
treecf4ac64347e3eecb3e8be4adb49aaa5b116e43bc /media/libstagefright/MediaCodec.cpp
parente710ae53001bbbf1e1afd6b3f5c3478c673afd0e (diff)
downloadframeworks_av-0abb2aa4859ced9165c77324cb83d1cd94f5f20c.zip
frameworks_av-0abb2aa4859ced9165c77324cb83d1cd94f5f20c.tar.gz
frameworks_av-0abb2aa4859ced9165c77324cb83d1cd94f5f20c.tar.bz2
Allow ALooper::awaitResponse to return immediately if the looper is stopped.
Bug: 25088488 Change-Id: I63e69886a8e9cffcaad675ca1a5642c0abf3b466
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r--media/libstagefright/MediaCodec.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index dc6009b..c2ffdf2 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -600,7 +600,12 @@ status_t MediaCodec::reclaim(bool force) {
msg->setInt32("force", force ? 1 : 0);
sp<AMessage> response;
- return PostAndAwaitResponse(msg, &response);
+ status_t ret = PostAndAwaitResponse(msg, &response);
+ if (ret == -ENOENT) {
+ ALOGD("MediaCodec looper is gone, skip reclaim");
+ ret = OK;
+ }
+ return ret;
}
status_t MediaCodec::release() {