summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-device.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-device.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-device.c')
-rw-r--r--backends/pulse/pulse-device.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/backends/pulse/pulse-device.c b/backends/pulse/pulse-device.c
index 5403712..9f33132 100644
--- a/backends/pulse/pulse-device.c
+++ b/backends/pulse/pulse-device.c
@@ -281,7 +281,10 @@ pulse_device_add_stream (PulseDevice *device, PulseStream *stream)
free_list_streams (device);
- g_hash_table_insert (device->priv->streams, g_strdup (name), stream);
+ g_hash_table_insert (device->priv->streams,
+ g_strdup (name),
+ g_object_ref (stream));
+
g_signal_emit_by_name (G_OBJECT (device),
"stream-added",
name);
@@ -382,7 +385,9 @@ pulse_device_load (PulseDevice *device, const pa_card_info *info)
icon,
info->ports[i]->priority);
- g_hash_table_insert (device->priv->ports, g_strdup (name), port);
+ g_hash_table_insert (device->priv->ports,
+ g_strdup (name),
+ g_object_ref (port));
}
#endif