diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mixer/pulse_mixer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c index a2a4444a9..ad84d7301 100644 --- a/src/mixer/pulse_mixer.c +++ b/src/mixer/pulse_mixer.c @@ -236,11 +236,17 @@ pulse_mixer_open(G_GNUC_UNUSED struct mixer *data) if(!(pm->context = pa_context_new(pa_threaded_mainloop_get_api(pm->mainloop), "Mixer mpd"))) { + pa_threaded_mainloop_stop(pm->mainloop); + pa_threaded_mainloop_free(pm->mainloop); g_debug("failed context"); return false; } if (!pulse_mixer_setup(pm)) { + pa_threaded_mainloop_stop(pm->mainloop); + pa_context_disconnect(pm->context); + pa_context_unref(pm->context); + pa_threaded_mainloop_free(pm->mainloop); return false; } |