summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-device.c
diff options
context:
space:
mode:
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