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

Commit a8f61328 authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am 359f90ce: Merge "The presence of the kKeyAACProfile is optional, we should...

am 359f90ce: Merge "The presence of the kKeyAACProfile is optional, we should not mandate its presence in AACWriter." into jb-dev

* commit '359f90ce':
  The presence of the kKeyAACProfile is optional, we should not mandate its presence in AACWriter.
parents ce0a54de 359f90ce
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;
}