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

Commit cfbd6261 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Fix theoretical race condition in addOutputTrack"

parents fadb2c73 b6b74062
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3239,6 +3239,7 @@ bool AudioFlinger::DuplicatingThread::threadLoop()

void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread)
{
    Mutex::Autolock _l(mLock);
    // FIXME explain this formula
    int frameCount = (3 * mFrameCount * mSampleRate) / thread->sampleRate();
    OutputTrack *outputTrack = new OutputTrack(thread,