Pull in scope of effectChains
Change-Id: Id5336f8663099088a0958fb8bd59fc5df9f92829
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 387ed4e..49520a1 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4195,7 +4195,6 @@
{
AudioBufferProvider::Buffer buffer;
sp<RecordTrack> activeTrack;
- Vector< sp<EffectChain> > effectChains;
nsecs_t lastWarning = 0;
@@ -4213,6 +4212,7 @@
processConfigEvents();
+ Vector< sp<EffectChain> > effectChains;
{ // scope for mLock
Mutex::Autolock _l(mLock);
checkForNewParameters_l();
@@ -4420,7 +4420,7 @@
}
// enable changes in effect chain
unlockEffectChains(effectChains);
- effectChains.clear();
+ // effectChains doesn't need to be cleared, since it is cleared by destructor at scope end
}
standby();