From a5e821439996de6005b2fa36b3bdd31f003ce23f Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 16 Apr 2012 13:47:17 -0700 Subject: AudioMixer: fix crash in destructor Commit deeb1282 made that track->resampler is only set to NULL when getTrackName() is called. It remains uninitialized for all unused tracks causing a crash when deleted by Audiomixer destructor. Issue 6309441. Change-Id: I49451387a6afe81299b8368ef206524df32f74c4 --- services/audioflinger/AudioMixer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'services/audioflinger/AudioMixer.cpp') diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 399d987b..05fa3b97 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -119,6 +119,7 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate, uint32_t maxNumTr for (unsigned i=0 ; i < MAX_NUM_TRACKS ; i++) { // FIXME redundant per track t->localTimeFreq = lc.getLocalFreq(); + t->resampler = NULL; t++; } -- cgit v1.2.3