when the mixer is closed, - the mainloop is stopped. - the context is disconnected. - then the mainloop is freed.
Signed-off-by: David Guibert <david.guib...@gmail.com> --- src/mixer/pulse_mixer.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c index 481fec2..a300a29 100644 --- a/src/mixer/pulse_mixer.c +++ b/src/mixer/pulse_mixer.c @@ -237,7 +237,20 @@ pulse_mixer_open(G_GNUC_UNUSED struct mixer *data) static void pulse_mixer_close(G_GNUC_UNUSED struct mixer *data) { - return; + struct pulse_mixer *pm=(struct pulse_mixer *) data; + if (pm->mainloop) + pa_threaded_mainloop_stop(pm->mainloop); + + if (pm->context) { + pa_context_disconnect(pm->context); + pa_context_unref(pm->context); + pm->context = NULL; + } + + if (pm->mainloop) { + pa_threaded_mainloop_free(pm->mainloop); + pm->mainloop = NULL; + } } static int -- tg: (b4de244..) t/pulse_mixer_close (depends on: t/offline-only-removed-sink) ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team