aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-30 22:28:15 +0200
committerMax Kellermann <max@duempel.org>2011-08-30 22:28:15 +0200
commit293836494de519769af8d672becd2e4e6f8fb0ef (patch)
tree52d9ddf419c41dd43d14b907ca0693b2e4dde053 /src/output_control.c
parentae8bda190ec94b52ac927b40fe88d80dbd0ba530 (diff)
downloadmpd-293836494de519769af8d672becd2e4e6f8fb0ef.tar.gz
mpd-293836494de519769af8d672becd2e4e6f8fb0ef.tar.xz
mpd-293836494de519769af8d672becd2e4e6f8fb0ef.zip
output_control: move code to audio_output_destruct()
.. and destruct the output object properly in test/run_output.
Diffstat (limited to 'src/output_control.c')
-rw-r--r--src/output_control.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/output_control.c b/src/output_control.c
index 8efe08f05..22c63b822 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -312,23 +312,8 @@ void audio_output_finish(struct audio_output *ao)
if (ao->thread != NULL) {
ao_lock_command(ao, AO_COMMAND_KILL);
g_thread_join(ao->thread);
+ ao->thread = NULL;
}
- if (ao->mixer != NULL)
- mixer_free(ao->mixer);
-
- ao_plugin_finish(ao->plugin, ao->data);
-
- g_cond_free(ao->cond);
- g_mutex_free(ao->mutex);
-
- if (ao->replay_gain_filter != NULL)
- filter_free(ao->replay_gain_filter);
-
- if (ao->other_replay_gain_filter != NULL)
- filter_free(ao->other_replay_gain_filter);
-
- filter_free(ao->filter);
-
- pcm_buffer_deinit(&ao->cross_fade_buffer);
+ audio_output_destruct(ao);
}