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

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

Merge "Fix theoretical race condition in addOutputTrack"

parents 2b119a63 91540aeb
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,