[PATCH spice-gtk 5/5] audio: stop playback on channel destroyed

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

 



Ensure playback is stopped when the channel is destroyed.
---
 gtk/spice-gstaudio.c | 2 ++
 gtk/spice-pulse.c    | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c
index f3c5c20..016b19b 100644
--- a/gtk/spice-gstaudio.c
+++ b/gtk/spice-gstaudio.c
@@ -477,6 +477,8 @@ channel_weak_notified(gpointer data,
     SpiceGstaudioPrivate *p = gstaudio->priv;
 
     if (where_the_object_was == (GObject *)p->pchannel) {
+        SPICE_DEBUG("playback closed");
+        playback_stop(gstaudio);
         p->pchannel = NULL;
     } else if (where_the_object_was == (GObject *)p->rchannel) {
         SPICE_DEBUG("record closed");
diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c
index 36955de..9c4e476 100644
--- a/gtk/spice-pulse.c
+++ b/gtk/spice-pulse.c
@@ -725,6 +725,8 @@ channel_weak_notified(gpointer data,
     SpicePulsePrivate *p = pulse->priv;
 
     if (where_the_object_was == (GObject *)p->pchannel) {
+        SPICE_DEBUG("playback closed");
+        playback_stop(pulse);
         p->pchannel = NULL;
     } else if (where_the_object_was == (GObject *)p->rchannel) {
         SPICE_DEBUG("record closed");
-- 
2.1.0

_______________________________________________
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]