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

Commit 4968f0de authored by Chaithanya Krishna Bacharaju's avatar Chaithanya Krishna Bacharaju Committed by Gerrit Code Review
Browse files

audioflinger: Initialize effectspool buffer size during allocation

-Crashes are observed during start of lpa playback with effects
enabled.
-Effectspool buffer size is invalid before initial two writes. If
effectsthread tries to access these buffers in such invalid state
it leads to crash.
-Initialize buffer size to 0 during effectspool buffer allocation.

CRs-Fixed: 415067
(cherry picked from commit 36591e0b53d869320d2a78b2f3c7f43924cb78b3)

Change-Id: I2616cfbfe914448e6489837f5d8686a8def7a883
parent fed033c3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6459,6 +6459,7 @@ void AudioFlinger::DirectAudioTrack::allocateBufPool() {
        memset(local_buf, 0, nSize);
        // Store this information for internal mapping / maintanence
        BufferInfo buf(local_buf, dsp_buf, nSize);
        buf.bytesToWrite = 0;
        mBufPool.push_back(buf);
        mEffectsPool.push_back(buf);