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

Commit 359f90ce authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "The presence of the kKeyAACProfile is optional, we should not mandate...

Merge "The presence of the kKeyAACProfile is optional, we should not mandate its presence in AACWriter." into jb-dev
parents 06f6ae34 2d94235a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -98,9 +98,13 @@ status_t AACWriter::addSource(const sp<MediaSource> &source) {
    CHECK(!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC));
    CHECK(meta->findInt32(kKeyChannelCount, &mChannelCount));
    CHECK(meta->findInt32(kKeySampleRate, &mSampleRate));
    CHECK(meta->findInt32(kKeyAACProfile, &mAACProfile));
    CHECK(mChannelCount >= 1 && mChannelCount <= 2);

    // Optionally, we want to check whether AACProfile is also set.
    if (meta->findInt32(kKeyAACProfile, &mAACProfile)) {
        ALOGI("AAC profile is changed to %d", mAACProfile);
    }

    mSource = source;
    return OK;
}