summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-09-11 02:15:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-09-11 02:15:40 +0000
commitad26bbdd44a0bf7e6fc93c76607cdcab25bc1617 (patch)
tree2f496c86e6976a497cfd8b4961e08c698a56fc33 /media
parenta2ab4505c807f42afe34809409c4e85d91618a8c (diff)
parent58828196edf2fc4debbd7913198a8149f039b4a9 (diff)
downloadframeworks_av-ad26bbdd44a0bf7e6fc93c76607cdcab25bc1617.zip
frameworks_av-ad26bbdd44a0bf7e6fc93c76607cdcab25bc1617.tar.gz
frameworks_av-ad26bbdd44a0bf7e6fc93c76607cdcab25bc1617.tar.bz2
Merge "libstagefright: Do not add audio codecs to resource manager. They are too small anyhow." into mnc-dr-dev
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/MediaCodec.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index cd59709..7019537 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -572,6 +572,7 @@ status_t MediaCodec::stop() {
}
status_t MediaCodec::reclaim() {
+ ALOGD("MediaCodec::reclaim(%p) %s", this, mInitName.c_str());
sp<AMessage> msg = new AMessage(kWhatRelease, this);
msg->setInt32("reclaimed", 1);
@@ -1154,8 +1155,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
resourceType = String8(kResourceNonSecureCodec);
}
- const char *subtype = mIsVideo ? kResourceVideoCodec : kResourceAudioCodec;
- addResource(resourceType, String8(subtype), 1);
+ if (mIsVideo) {
+ // audio codec is currently ignored.
+ addResource(resourceType, String8(kResourceVideoCodec), 1);
+ }
(new AMessage)->postReply(mReplyID);
break;