summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-05-08 10:50:03 -0700
committerEric Laurent <elaurent@google.com>2015-08-18 11:25:37 -0700
commitb97ee930e4f7ed1587b869c92b4aa1dc90b641cc (patch)
treeb4917494c7a99ff9d4ed9552d2a5f205931593ca /services/audioflinger/Threads.cpp
parent65842db06c2d77e53cc5ac61692160d844cc7d0a (diff)
downloadframeworks_av-b97ee930e4f7ed1587b869c92b4aa1dc90b641cc.zip
frameworks_av-b97ee930e4f7ed1587b869c92b4aa1dc90b641cc.tar.gz
frameworks_av-b97ee930e4f7ed1587b869c92b4aa1dc90b641cc.tar.bz2
DO NOT MERGE - audio flinger: fix fuzz test crash
Clear output stream pointer in duplicating thread when the main output to which it is attached is closed. Also do not forward master mute and volume commands to duplicating threads as this is not applicable. Also fix logic in AudioFlinger::primaryPlaybackThread_l() that could accidentally return a duplicating thread. This never happens because the primary thread is always first in the list. Bug: 20731946. Change-Id: Ic8869699836920351b23d09544c50a258d3fb585 (cherry picked from commit f6870aefc5e31d4220f3778c4e79ff34a61f48ad)
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 71a6a73..b429cc2 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4761,10 +4761,13 @@ void AudioFlinger::DuplicatingThread::removeOutputTrack(MixerThread *thread)
mOutputTracks[i]->destroy();
mOutputTracks.removeAt(i);
updateWaitTime_l();
+ if (thread->getOutput() == mOutput) {
+ mOutput = NULL;
+ }
return;
}
}
- ALOGV("removeOutputTrack(): unkonwn thread: %p", thread);
+ ALOGV("removeOutputTrack(): unknown thread: %p", thread);
}
// caller must hold mLock