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

Commit b5ef6e5d authored by Andreas Huber's avatar Andreas Huber
Browse files

Make sure we return input/output buffers to the codec not just while

flushing but also while stopping.

Change-Id: I23534008b93654c9b9c022c0b1d204c2b546d566
parent 0862a56c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -577,7 +577,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
                {
                    /* size_t index = */updateBuffers(kPortIndexInput, msg);

                    if (mState == FLUSHING) {
                    if (mState == FLUSHING || mState == STOPPING) {
                        returnBuffersToCodecOnPort(kPortIndexInput);
                        break;
                    }
@@ -596,7 +596,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
                {
                    /* size_t index = */updateBuffers(kPortIndexOutput, msg);

                    if (mState == FLUSHING) {
                    if (mState == FLUSHING || mState == STOPPING) {
                        returnBuffersToCodecOnPort(kPortIndexOutput);
                        break;
                    }