[PATCH spice-gtk] spice-pulse: Fix set_sink_input_volume() failed on seamless migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]