summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-backend.c
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-08-20 18:53:26 +0200
committerMichal Ratajsky <[email protected]>2014-08-20 18:53:26 +0200
commit0325b6223a23ebd75fbd8c9244baab00facec126 (patch)
tree8547bdc4a9e875d931eddbeb81e34ec37ddfbfef /backends/pulse/pulse-backend.c
parent9956b2a9465c538c8792235c1ee02d2f90b84641 (diff)
downloadlibmatemixer-0325b6223a23ebd75fbd8c9244baab00facec126.tar.bz2
libmatemixer-0325b6223a23ebd75fbd8c9244baab00facec126.tar.xz
Fix some refcounting and stream control parent setting issues
Diffstat (limited to 'backends/pulse/pulse-backend.c')
-rw-r--r--backends/pulse/pulse-backend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/pulse/pulse-backend.c b/backends/pulse/pulse-backend.c
index e1b7ed5..1a1cabc 100644
--- a/backends/pulse/pulse-backend.c
+++ b/backends/pulse/pulse-backend.c
@@ -762,7 +762,7 @@ on_connection_card_info (PulseConnection *connection,
g_hash_table_insert (pulse->priv->devices,
GUINT_TO_POINTER (info->index),
- device);
+ g_object_ref (device));
free_list_devices (pulse);
g_signal_emit_by_name (G_OBJECT (pulse),
@@ -814,7 +814,7 @@ on_connection_sink_info (PulseConnection *connection,
free_list_streams (pulse);
g_hash_table_insert (pulse->priv->sinks,
GUINT_TO_POINTER (info->index),
- stream);
+ g_object_ref (stream));
if (device != NULL) {
pulse_device_add_stream (device, stream);
@@ -932,7 +932,7 @@ on_connection_source_info (PulseConnection *connection,
free_list_streams (pulse);
g_hash_table_insert (pulse->priv->sources,
GUINT_TO_POINTER (info->index),
- stream);
+ g_object_ref (stream));
if (device != NULL) {
pulse_device_add_stream (device, stream);
@@ -1051,7 +1051,7 @@ on_connection_ext_stream_info (PulseConnection *connection,
free_list_ext_streams (pulse);
g_hash_table_insert (pulse->priv->ext_streams,
g_strdup (info->name),
- ext);
+ g_object_ref (ext));
g_signal_emit_by_name (G_OBJECT (pulse),
"stored-control-added",
@@ -1091,7 +1091,7 @@ on_connection_ext_stream_loaded (PulseConnection *connection, PulseBackend *puls
continue;
free_list_ext_streams (pulse);
- g_hash_table_remove (pulse->priv->ext_streams, (gconstpointer) name);
+ g_hash_table_iter_remove (&iter);
g_signal_emit_by_name (G_OBJECT (pulse),
"stored-control-removed",