diff options
-rw-r--r-- | gtk/spice-gstaudio.c | 7 | ||||
-rw-r--r-- | gtk/spice-pulse.c | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c index 936aa5b..3bdf23e 100644 --- a/gtk/spice-gstaudio.c +++ b/gtk/spice-gstaudio.c @@ -257,9 +257,8 @@ cleanup: gst_element_set_state(p->record.pipe, GST_STATE_PLAYING); } -static void playback_stop(SpicePlaybackChannel *channel, gpointer data) +static void playback_stop(SpiceGstaudio *gstaudio) { - SpiceGstaudio *gstaudio = data; SpiceGstaudioPrivate *p = gstaudio->priv; if (p->playback.pipe) @@ -303,7 +302,7 @@ static void playback_start(SpicePlaybackChannel *channel, gint format, gint chan if (p->playback.pipe && (p->playback.rate != frequency || p->playback.channels != channels)) { - playback_stop(channel, data); + playback_stop(gstaudio); gst_object_unref(p->playback.pipe); p->playback.pipe = NULL; } @@ -518,7 +517,7 @@ static gboolean connect_channel(SpiceAudio *audio, SpiceChannel *channel) spice_g_signal_connect_object(channel, "playback-data", G_CALLBACK(playback_data), gstaudio, 0); spice_g_signal_connect_object(channel, "playback-stop", - G_CALLBACK(playback_stop), gstaudio, 0); + G_CALLBACK(playback_stop), gstaudio, G_CONNECT_SWAPPED); spice_g_signal_connect_object(channel, "notify::volume", G_CALLBACK(playback_volume_changed), gstaudio, 0); spice_g_signal_connect_object(channel, "notify::mute", diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c index 916f1d0..2373c72 100644 --- a/gtk/spice-pulse.c +++ b/gtk/spice-pulse.c @@ -489,9 +489,8 @@ static void playback_data(SpicePlaybackChannel *channel, p->playback.state = state; } -static void playback_stop(SpicePlaybackChannel *channel, gpointer data) +static void playback_stop(SpicePulse *pulse) { - SpicePulse *pulse = data; SpicePulsePrivate *p = pulse->priv; SPICE_DEBUG("%s: #underflow %u", __FUNCTION__, p->playback.num_underflow); @@ -800,7 +799,7 @@ static gboolean connect_channel(SpiceAudio *audio, SpiceChannel *channel) spice_g_signal_connect_object(channel, "playback-data", G_CALLBACK(playback_data), pulse, 0); spice_g_signal_connect_object(channel, "playback-stop", - G_CALLBACK(playback_stop), pulse, 0); + G_CALLBACK(playback_stop), pulse, G_CONNECT_SWAPPED); spice_g_signal_connect_object(channel, "notify::volume", G_CALLBACK(playback_volume_changed), pulse, 0); spice_g_signal_connect_object(channel, "notify::mute", |