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

Commit d9e0603a authored by Chong Zhang's avatar Chong Zhang
Browse files

MediaCodec: resume codec if state is FLUSHED in async mode

bug: 18513091

Change-Id: I192625c61834584f711de76db788c2c0332ae774
parent bc0f452b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1326,8 +1326,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
            CHECK(msg->senderAwaitsResponse(&replyID));

            if (mState == FLUSHED) {
                setState(STARTED);
                mCodec->signalResume();
                PostReplyWithError(replyID, OK);
                break;
            } else if (mState != CONFIGURED) {
                PostReplyWithError(replyID, INVALID_OPERATION);
                break;