aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/pulse_mixer_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-22 20:28:12 +0200
committerMax Kellermann <max@duempel.org>2009-10-22 20:28:12 +0200
commit7dd172efecca315cb5dcbf2e27d06f6a72d361d1 (patch)
tree18e4e3f5e9eea95475ead0fc8ed6b78766031cef /src/mixer/pulse_mixer_plugin.c
parent80ac82c8fb517bd22c29436f4bc47648b7c5b5d4 (diff)
downloadmpd-7dd172efecca315cb5dcbf2e27d06f6a72d361d1.tar.gz
mpd-7dd172efecca315cb5dcbf2e27d06f6a72d361d1.tar.xz
mpd-7dd172efecca315cb5dcbf2e27d06f6a72d361d1.zip
mixer/pulse: don't get volume if stream is not yet ready
Moved the check from pulse_mixer_open() to pulse_mixer_update().
Diffstat (limited to '')
-rw-r--r--src/mixer/pulse_mixer_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mixer/pulse_mixer_plugin.c b/src/mixer/pulse_mixer_plugin.c
index b33ef80ae..fc0e7867a 100644
--- a/src/mixer/pulse_mixer_plugin.c
+++ b/src/mixer/pulse_mixer_plugin.c
@@ -98,7 +98,8 @@ pulse_mixer_update(struct pulse_mixer *pm)
assert(pm->output->stream != NULL);
- if (pm->output->context == NULL)
+ if (pm->output->context == NULL ||
+ pa_stream_get_state(pm->output->stream) != PA_STREAM_READY)
return;
o = pa_context_get_sink_input_info(pm->output->context,
@@ -243,8 +244,7 @@ pulse_mixer_open(struct mixer *data, G_GNUC_UNUSED GError **error_r)
struct pulse_mixer *pm = (struct pulse_mixer *) data;
pa_threaded_mainloop_lock(pm->output->mainloop);
- if (pm->output->stream != NULL &&
- pa_stream_get_state(pm->output->stream) == PA_STREAM_READY)
+ if (pm->output->stream != NULL)
pulse_mixer_update(pm);
pa_threaded_mainloop_unlock(pm->output->mainloop);