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

Commit 7845a1f0 authored by Erik Wolsheimer's avatar Erik Wolsheimer
Browse files

fix deadlock in MediaPlayerService

BUG: 25263909

Change-Id: I3f08c02a851b67ab269e9aef7b2fb17eda09ea5d
parent 06195062
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1894,8 +1894,13 @@ void MediaPlayerService::AudioOutput::pause()
void MediaPlayerService::AudioOutput::close()
{
    ALOGV("close");
    sp<AudioTrack> track;
    {
        Mutex::Autolock lock(mLock);
    close_l();
        track = mTrack;
        close_l(); // clears mTrack
    }
    // destruction of the track occurs outside of mutex.
}

void MediaPlayerService::AudioOutput::setVolume(float left, float right)