Loading services/audioflinger/AudioFlinger.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -3139,16 +3139,21 @@ sp<IEffect> AudioFlinger::createEffect( bool pinned = (sessionId > AUDIO_SESSION_OUTPUT_MIX) && isSessionAcquired_l(sessionId); handle = thread->createEffect_l(client, effectClient, priority, sessionId, &desc, enabled, &lStatus, pinned); if (handle != 0 && id != NULL) { *id = handle->id(); } if (handle == 0) { if (lStatus != NO_ERROR && lStatus != ALREADY_EXISTS) { // remove local strong reference to Client with mClientLock held Mutex::Autolock _cl(mClientLock); client.clear(); } else { // handle must be valid here, but check again to be safe. if (handle.get() != nullptr && id != nullptr) *id = handle->id(); } } if (lStatus != NO_ERROR && lStatus != ALREADY_EXISTS) { // handle must be cleared outside lock. handle.clear(); } Exit: *status = lStatus; return handle; Loading services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1360,7 +1360,7 @@ Exit: if (chainCreated) { removeEffectChain_l(chain); } handle.clear(); // handle must be cleared by caller to avoid deadlock. } *status = lStatus; Loading Loading
services/audioflinger/AudioFlinger.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -3139,16 +3139,21 @@ sp<IEffect> AudioFlinger::createEffect( bool pinned = (sessionId > AUDIO_SESSION_OUTPUT_MIX) && isSessionAcquired_l(sessionId); handle = thread->createEffect_l(client, effectClient, priority, sessionId, &desc, enabled, &lStatus, pinned); if (handle != 0 && id != NULL) { *id = handle->id(); } if (handle == 0) { if (lStatus != NO_ERROR && lStatus != ALREADY_EXISTS) { // remove local strong reference to Client with mClientLock held Mutex::Autolock _cl(mClientLock); client.clear(); } else { // handle must be valid here, but check again to be safe. if (handle.get() != nullptr && id != nullptr) *id = handle->id(); } } if (lStatus != NO_ERROR && lStatus != ALREADY_EXISTS) { // handle must be cleared outside lock. handle.clear(); } Exit: *status = lStatus; return handle; Loading
services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1360,7 +1360,7 @@ Exit: if (chainCreated) { removeEffectChain_l(chain); } handle.clear(); // handle must be cleared by caller to avoid deadlock. } *status = lStatus; Loading