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

Commit 9bb8ff62 authored by Andy Hung's avatar Andy Hung Committed by Gerrit Code Review
Browse files

Merge "RecordThread: Fix sp<> release with mutex held" into main

parents 791c42a6 fdb84b9f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8153,7 +8153,6 @@ bool RecordThread::threadLoop()
    inputStandBy();

reacquire_wakelock:
    sp<IAfRecordTrack> activeTrack;
    {
        audio_utils::lock_guard _l(mutex());
        acquireWakeLock_l();
@@ -8169,6 +8168,8 @@ reacquire_wakelock:

    // loop while there is work to do
    for (int64_t loopCount = 0;; ++loopCount) {  // loopCount used for statistics tracking
        // Note: these sp<> are released at the end of the for loop outside of the mutex() lock.
        sp<IAfRecordTrack> activeTrack;
        Vector<sp<IAfEffectChain>> effectChains;

        // activeTracks accumulates a copy of a subset of mActiveTracks