aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output_control.c')
-rw-r--r--src/output_control.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/output_control.c b/src/output_control.c
index eac9bdfcb..70c6d2b1a 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -23,6 +23,7 @@
#include "output_thread.h"
#include "mixer_control.h"
#include "mixer_plugin.h"
+#include "filter_plugin.h"
#include <assert.h>
#include <stdlib.h>
@@ -82,26 +83,13 @@ audio_output_open(struct audio_output *ao,
ao->in_audio_format = *audio_format;
ao->chunk = NULL;
- if (!ao->config_audio_format) {
- if (ao->open)
- audio_output_close(ao);
-
- /* no audio format is configured: copy in->out, let
- the output's open() method determine the effective
- out_audio_format */
- ao->out_audio_format = ao->in_audio_format;
- }
-
ao->pipe = mp;
if (ao->thread == NULL)
audio_output_thread_start(ao);
+ ao_command(ao, ao->open ? AO_COMMAND_REOPEN : AO_COMMAND_OPEN);
open = ao->open;
- if (!open) {
- ao_command(ao, AO_COMMAND_OPEN);
- open = ao->open;
- }
if (open && ao->mixer != NULL)
mixer_open(ao->mixer);
@@ -184,4 +172,6 @@ void audio_output_finish(struct audio_output *ao)
notify_deinit(&ao->notify);
g_mutex_free(ao->mutex);
+
+ filter_free(ao->filter);
}