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

Commit 5094675a authored by Glenn Kasten's avatar Glenn Kasten Committed by Android Git Automerger
Browse files

am a3603693: Merge "Fix deadlock" into lmp-preview-dev

* commit 'a3603693':
  Fix deadlock
parents 1555a988 a3603693
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -5139,7 +5139,7 @@ reacquire_wakelock:
            sleepUs = kRecordThreadSleepUs;
        }
        if (framesRead <= 0) {
            continue;
            goto unlock;
        }
        ALOG_ASSERT(framesRead > 0);

@@ -5147,11 +5147,13 @@ reacquire_wakelock:
            (void) mTeeSink->write(&mRsmpInBuffer[rear * mChannelCount], framesRead);
        }
        // If destination is non-contiguous, we now correct for reading past end of buffer.
        {
            size_t part1 = mRsmpInFramesP2 - rear;
            if ((size_t) framesRead > part1) {
                memcpy(mRsmpInBuffer, &mRsmpInBuffer[mRsmpInFramesP2 * mChannelCount],
                        (framesRead - part1) * mFrameSize);
            }
        }
        rear = mRsmpInRear += framesRead;

        size = activeTracks.size();
@@ -5358,6 +5360,7 @@ reacquire_wakelock:

        }

unlock:
        // enable changes in effect chain
        unlockEffectChains(effectChains);
        // effectChains doesn't need to be cleared, since it is cleared by destructor at scope end