summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodec.cpp
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-09-10 10:53:22 -0700
committerRonghua Wu <ronghuawu@google.com>2015-09-10 10:53:22 -0700
commit58828196edf2fc4debbd7913198a8149f039b4a9 (patch)
tree75539c737d0fa9c23fa9bb91effaef78ab860f0b /media/libstagefright/MediaCodec.cpp
parent5dc3d9928f85580a2351925b5f11ff0189524c39 (diff)
downloadframeworks_av-58828196edf2fc4debbd7913198a8149f039b4a9.zip
frameworks_av-58828196edf2fc4debbd7913198a8149f039b4a9.tar.gz
frameworks_av-58828196edf2fc4debbd7913198a8149f039b4a9.tar.bz2
libstagefright: Do not add audio codecs to resource manager. They are too small anyhow.
Bug: 23703241 Change-Id: I3c2882a1d6736bb8a4099289d8bab4974343586d
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-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;