summaryrefslogtreecommitdiff
path: root/indra/media_plugins/webkit
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-22 14:29:37 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-22 14:29:37 +0000
commit95ccfd806cd5f5859d09503f60a85987eb8bb1af (patch)
tree0bd60f564c247a3d6f9d961fca62b0322cc5df11 /indra/media_plugins/webkit
parentb2fbb28dc99b19ea302a4c18656b0544572a5ebe (diff)
Do some decent cleanup in LinuxVolumeCatcherImpl's destructor. Though I don't think media plugins are really 'destroyed' as we know it, their process just ends.
Diffstat (limited to 'indra/media_plugins/webkit')
-rw-r--r--indra/media_plugins/webkit/linux_volume_catcher.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp
index cfb78d2036..cc5a456c96 100644
--- a/indra/media_plugins/webkit/linux_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp
@@ -148,9 +148,20 @@ void LinuxVolumeCatcherImpl::init()
void LinuxVolumeCatcherImpl::cleanup()
{
- // there's some cleanup we could do, but do nothing... for now.
-
mConnected = false;
+
+ if (mPAContext)
+ {
+ pa_context_disconnect(mPAContext);
+ pa_context_unref(mPAContext);
+ mPAContext = NULL;
+ }
+
+ if (mMainloop)
+ {
+ pa_glib_mainloop_free(mMainloop);
+ mMainloop = NULL;
+ }
}
void LinuxVolumeCatcherImpl::setVolume(F32 volume)