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

Commit d08b2c90 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "audioflinger: patchtrack: fix crash on output closure" into main

parents 367cb451 1353b293
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1311,7 +1311,9 @@ void Track::stop()
            if (!playbackThread->isTrackActive(this)) {
                reset();
                mState = STOPPED;
            } else if (!isFastTrack() && !isOffloaded() && !isDirect()) {
            } else if (isPatchTrack() || (!isFastTrack() && !isOffloaded() && !isDirect())) {
                // for a PatchTrack (whatever fast ot not), do not drain but move directly
                // to STOPPED to avoid closing while active.
                mState = STOPPED;
            } else {
                // For fast tracks prepareTracks_l() will set state to STOPPING_2