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

Commit f0937247 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Properly signal an error if codec configuration goes wrong." into jb-mr1.1-dev

parents 0224bf17 4471e47e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -937,7 +937,8 @@ status_t ACodec::configureCodec(
            }

            err = setupAACCodec(
                    encoder, numChannels, sampleRate, bitRate, aacProfile, isADTS != 0);
                    encoder, numChannels, sampleRate, bitRate, aacProfile,
                    isADTS != 0);
        }
    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_NB)) {
        err = setupAMRCodec(encoder, false /* isWAMR */, bitRate);
@@ -986,6 +987,10 @@ status_t ACodec::configureCodec(
        }
    }

    if (err != OK) {
        return err;
    }

    if (!msg->findInt32("encoder-delay", &mEncoderDelay)) {
        mEncoderDelay = 0;
    }