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

Commit a51d292d authored by Harish Mahendrakar's avatar Harish Mahendrakar
Browse files

CCodecConfig: Remove SBR mode from SDK message when it is set to auto

Bug: 184897813
Test: Set aac-sbr-mode to 0,1,2,3 using AMediaCodec based application
Test: atest CtsMediaV2TestCases

Change-Id: Ib5042f853178ad589715dd879a30bdbbb660303b
parent 66547278
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1319,6 +1319,14 @@ sp<AMessage> CCodecConfig::getFormatForDomain(
        }
    }

    // Remove KEY_AAC_SBR_MODE from SDK message if it is outside supported range
    // as SDK doesn't have a way to signal default sbr mode based on profile and
    // requires that the key isn't present in format to signal that
    int sbrMode;
    if (msg->findInt32(KEY_AAC_SBR_MODE, &sbrMode) && (sbrMode < 0 || sbrMode > 2)) {
        msg->removeEntryAt(msg->findEntryByName(KEY_AAC_SBR_MODE));
    }

    { // convert color info
        // move default color to color aspect if not read from the component
        int32_t tmp;