Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 885dedb4 authored by Ronghua Wu's avatar Ronghua Wu Committed by Android Git Automerger
Browse files

am ad26bbdd: Merge "libstagefright: Do not add audio codecs to resource...

am ad26bbdd: Merge "libstagefright: Do not add audio codecs to resource manager. They are too small anyhow." into mnc-dr-dev

* commit 'ad26bbdd':
  libstagefright: Do not add audio codecs to resource manager. They are too small anyhow.
parents 48e879db ad26bbdd
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;