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

Commit df926d0e authored by Wonsik Kim's avatar Wonsik Kim Committed by Gerrit Code Review
Browse files

Merge "C2SoftAacEnc: Fix setting SBR mode"

parents f81e44f2 bc1a277a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -272,8 +272,9 @@ status_t C2SoftAacEnc::setAudioParams() {
        return UNKNOWN_ERROR;
    }

    if (sbrMode != -1 && aacProfile == C2Config::PROFILE_AAC_ELD) {
        if (AACENC_OK != aacEncoder_SetParam(mAACEncoder, AACENC_SBR_MODE, sbrMode)) {
    if (sbrMode != C2Config::AAC_SBR_AUTO && aacProfile == C2Config::PROFILE_AAC_ELD) {
        int aacSbrMode = sbrMode != C2Config::AAC_SBR_OFF;
        if (AACENC_OK != aacEncoder_SetParam(mAACEncoder, AACENC_SBR_MODE, aacSbrMode)) {
            ALOGE("Failed to set AAC encoder parameters");
            return UNKNOWN_ERROR;
        }