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

Commit 5ad60438 authored by Mingming Yin's avatar Mingming Yin
Browse files

stagefright: fix for Executing state in resumeLocked

- When resumeLocked is called in Executing state, do
  nothing and return OK to avoid additional state change
  to Executing.

Change-Id: I015ad098d4efd480c1628598f519e96a16537f6e
CRs-Fixed: 740435
parent d9b04af0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -5033,10 +5033,14 @@ status_t OMXCodec::pause() {
status_t OMXCodec::resumeLocked(bool drainInputBuf) {
   CODEC_LOGV("resume mState=%d", mState);

   if (!strncmp(mComponentName, "OMX.qcom.", 9)) {
   if (!strncmp(mComponentName, "OMX.qcom.", 9) && mPaused) {
        while (isIntermediateState(mState)) {
            mAsyncCompletion.wait(mLock);
        }
        if (mState == (status_t)EXECUTING) {
            CODEC_LOGI("in EXECUTING state, return OK");
            return OK;
        }
        CHECK_EQ(mState, (status_t)PAUSED);
        status_t err = mOMX->sendCommand(mNode,
        OMX_CommandStateSet, OMX_StateExecuting);