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

Commit e09bf824 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android Git Automerger
Browse files

am 6874ed79: am a9d2f9fb: Merge "stagefright: preserve output format flags on...

am 6874ed79: am a9d2f9fb: Merge "stagefright: preserve output format flags on format change" into lmp-mr1-dev

* commit '6874ed79':
  stagefright: preserve output format flags on format change
parents 1ed99f0c 6874ed79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ private:
    sp<ANativeWindow> mNativeWindow;
    sp<AMessage> mInputFormat;
    sp<AMessage> mOutputFormat;
    sp<AMessage> mBaseOutputFormat;

    Vector<BufferInfo> mBuffers[2];
    bool mPortEOS[2];
+5 −2
Original line number Diff line number Diff line
@@ -1157,7 +1157,7 @@ status_t ACodec::configureCodec(
    }

    sp<AMessage> inputFormat = new AMessage();
    sp<AMessage> outputFormat = new AMessage();
    sp<AMessage> outputFormat = mNotify->dup(); // will use this for kWhatOutputFormatChanged

    mIsEncoder = encoder;

@@ -1542,6 +1542,8 @@ status_t ACodec::configureCodec(
        err = setMinBufferSize(kPortIndexInput, 8192);  // XXX
    }

    mBaseOutputFormat = outputFormat;

    CHECK_EQ(getPortFormat(kPortIndexInput, inputFormat), (status_t)OK);
    CHECK_EQ(getPortFormat(kPortIndexOutput, outputFormat), (status_t)OK);
    mInputFormat = inputFormat;
@@ -3531,7 +3533,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
}

void ACodec::sendFormatChange(const sp<AMessage> &reply) {
    sp<AMessage> notify = mNotify->dup();
    sp<AMessage> notify = mBaseOutputFormat->dup();
    notify->setInt32("what", kWhatOutputFormatChanged);

    CHECK_EQ(getPortFormat(kPortIndexOutput, notify), (status_t)OK);
@@ -4645,6 +4647,7 @@ void ACodec::LoadedState::stateEntered() {
    mCodec->mRepeatFrameDelayUs = -1ll;
    mCodec->mInputFormat.clear();
    mCodec->mOutputFormat.clear();
    mCodec->mBaseOutputFormat.clear();

    if (mCodec->mShutdownInProgress) {
        bool keepComponentAllocated = mCodec->mKeepComponentAllocated;