summaryrefslogtreecommitdiffstats
path: root/ext/pulse
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-06-15 15:51:32 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-06-15 15:51:32 +0100
commitdea67f3d96595b9d05875952c98d37f65254ff35 (patch)
tree2fea46d312960622bf2882c65041de9b6e706984 /ext/pulse
parent7ade32216f530790e77e0634cb5d1c60ed265f59 (diff)
pulsesink: ref custom ring buffer class and type in class_init
Hack around thread-safety issues in GObject and our racy _get_type() functions (we could easily fix the _get_type() functions, but we still need to hack around the GObject class races until we require a newer GLib version, I think).
Diffstat (limited to 'ext/pulse')
-rw-r--r--ext/pulse/pulsesink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index cc9902cd..d18c5238 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -183,6 +183,10 @@ gst_pulseringbuffer_class_init (GstPulseRingBufferClass * klass)
gstringbuffer_class->stop = GST_DEBUG_FUNCPTR (gst_pulseringbuffer_stop);
gstringbuffer_class->commit = GST_DEBUG_FUNCPTR (gst_pulseringbuffer_commit);
+
+ /* ref class from a thread-safe context to work around missing bit of
+ * thread-safety in GObject */
+ g_type_class_ref (GST_TYPE_PULSERING_BUFFER);
}
static void