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

Commit 048cd58b authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodecConfig: don't dup input format

Input format reference does not get updated in MediaCodec.

Bug: 169831253
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: I173164c91796cab9414d9645cea88e1133667053
parent 1e05a85f
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1151,14 +1151,11 @@ bool CCodecConfig::updateFormats(Domain domain) {

    bool changed = false;
    if (domain & mInputDomain) {
        sp<AMessage> oldFormat = mInputFormat;
        mInputFormat = mInputFormat->dup(); // trigger format changed
        sp<AMessage> oldFormat = mInputFormat->dup();
        mInputFormat->extend(getFormatForDomain(reflected, mInputDomain));
        if (mInputFormat->countEntries() != oldFormat->countEntries()
                || mInputFormat->changesFrom(oldFormat)->countEntries() > 0) {
            changed = true;
        } else {
            mInputFormat = oldFormat; // no change
        }
    }
    if (domain & mOutputDomain) {