[Spice-devel] [PATCH spice-gtk] spice-pulse: Fix set_sink_input_volume() failed on seamless migration
Hans de Goede
hdegoede at redhat.com
Fri Mar 29 02:31:33 PDT 2013
On seamless migration "switch-over" the playback_volume_changed callback gets
called, and at this time the channel object's nchannels property is 0,
leading to a warning like this:
(remote-viewer:8726): GSpice-WARNING **: set_sink_input_volume() failed: Invalid argument
This patch fixes this.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
gtk/spice-pulse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c
index 6a977c4..ea7894e 100644
--- a/gtk/spice-pulse.c
+++ b/gtk/spice-pulse.c
@@ -599,7 +599,7 @@ static void playback_volume_changed(GObject *object, GParamSpec *pspec, gpointer
SPICE_DEBUG("playback volume changed %u", v.values[i]);
}
- if (!p->playback.stream ||
+ if (!nchannels || !p->playback.stream ||
pa_stream_get_index(p->playback.stream) == PA_INVALID_INDEX)
return;
--
1.8.1.4
More information about the Spice-devel
mailing list