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

Commit 8ae17afd authored by Krishnankutty Kolathappilly's avatar Krishnankutty Kolathappilly Committed by Steve Kondik
Browse files

audioflinger: Fix monkey crash in audioflinger set parameter.

-Track ref ptr is initialized to direct track pointer only in create
 Direct Track although the descriptor is created in open Output
-If there is a set parameter coming in during this time it could
 result in a crash as track ref ptr is not initialized.
-Initialize track ref ptr to NULL when descriptor is created.

Change-Id: Iee887baee45a9e7b381f6e2ea2ab523a23689f6b
parent 56ad78f9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1682,6 +1682,7 @@ audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module,
            desc->mVolumeLeft = 1.0;
            desc->mVolumeRight = 1.0;
            desc->device = *pDevices;
            desc->trackRefPtr = NULL;
            mDirectAudioTracks.add(id, desc);
            mDirectDevice = desc->device;
        } else if ((flags & AUDIO_OUTPUT_FLAG_DIRECT) ||