diff options
author | Maki <maki@hotmilk.space> | 2024-04-20 17:55:34 -0400 |
---|---|---|
committer | Maki <maki@hotmilk.space> | 2024-04-20 17:55:34 -0400 |
commit | 90cf3ee30bd082d1352a3182f598bc0d3860ef8b (patch) | |
tree | 28234e12425c2f781356c7550f14ccfdd3cdd29a /indra/media_plugins/cef | |
parent | e6ca21549ee1d4a23c82e12d9215ce993d99ca3e (diff) |
Fix more style issues and add missing RAII lock
Diffstat (limited to 'indra/media_plugins/cef')
-rwxr-xr-x | indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp b/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp index c05054cf52..213efbfcfb 100755 --- a/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp +++ b/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp @@ -140,10 +140,13 @@ void VolumeCatcherPipeWire::cleanup() childNodesLock.unlock(); std::unique_lock pwLock(*this); - if (mRegistry) llpw_proxy_destroy((struct pw_proxy*)mRegistry); + if (mRegistry) + llpw_proxy_destroy((struct pw_proxy*)mRegistry); spa_zero(mRegistryListener); - if (mCore) llpw_core_disconnect(mCore); - if (mContext) llpw_context_destroy(mContext); + if (mCore) + llpw_core_disconnect(mCore); + if (mContext) + llpw_context_destroy(mContext); pwLock.unlock(); if (!mThreadLoop) @@ -221,9 +224,9 @@ void VolumeCatcherPipeWire::ChildNode::destroy() mActive = false; - mImpl->mChildNodesMutex.lock(); + std::unique_lock childNodesLock(mImpl->mChildNodesMutex); mImpl->mChildNodes.erase(this); - mImpl->mChildNodesMutex.unlock(); + childNodesLock.unlock(); spa_hook_remove(&mNodeListener); spa_hook_remove(&mProxyListener); |