From 58828196edf2fc4debbd7913198a8149f039b4a9 Mon Sep 17 00:00:00 2001 From: Ronghua Wu Date: Thu, 10 Sep 2015 10:53:22 -0700 Subject: libstagefright: Do not add audio codecs to resource manager. They are too small anyhow. Bug: 23703241 Change-Id: I3c2882a1d6736bb8a4099289d8bab4974343586d --- media/libstagefright/MediaCodec.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'media/libstagefright/MediaCodec.cpp') 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 msg = new AMessage(kWhatRelease, this); msg->setInt32("reclaimed", 1); @@ -1154,8 +1155,10 @@ void MediaCodec::onMessageReceived(const sp &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; -- cgit v1.1