From 70089160f84d882d1ee7cd1708df1ee87bf69b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 16 Jun 2009 14:05:04 +0100 Subject: [PATCH] audiosink, audiosrc: do the class_ref()s in the right class_init functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by Philip Jägenstedt. Hopefully fixes #585970 for real. --- gst-libs/gst/audio/gstaudiosink.c | 6 ++---- gst-libs/gst/audio/gstaudiosrc.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 479267e413..2d4bfe530b 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -191,10 +191,6 @@ gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass) gstringbuffer_class->delay = GST_DEBUG_FUNCPTR (gst_audioringbuffer_delay); gstringbuffer_class->activate = GST_DEBUG_FUNCPTR (gst_audioringbuffer_activate); - - /* ref class from a thread-safe context to work around missing bit of - * thread-safety in GObject */ - g_type_class_ref (GST_TYPE_AUDIORING_BUFFER); } typedef guint (*WriteFunc) (GstAudioSink * sink, gpointer data, guint length); @@ -596,6 +592,8 @@ gst_audio_sink_class_init (GstAudioSinkClass * klass) gstbaseaudiosink_class->create_ringbuffer = GST_DEBUG_FUNCPTR (gst_audio_sink_create_ringbuffer); + + g_type_class_ref (GST_TYPE_AUDIORING_BUFFER); } static void diff --git a/gst-libs/gst/audio/gstaudiosrc.c b/gst-libs/gst/audio/gstaudiosrc.c index ff183b8883..602673438d 100644 --- a/gst-libs/gst/audio/gstaudiosrc.c +++ b/gst-libs/gst/audio/gstaudiosrc.c @@ -183,10 +183,6 @@ gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass) gstringbuffer_class->stop = GST_DEBUG_FUNCPTR (gst_audioringbuffer_stop); gstringbuffer_class->delay = GST_DEBUG_FUNCPTR (gst_audioringbuffer_delay); - - /* ref class from a thread-safe context to work around missing bit of - * thread-safety in GObject */ - g_type_class_ref (GST_TYPE_AUDIORING_BUFFER); } typedef guint (*ReadFunc) (GstAudioSrc * src, gpointer data, guint length); @@ -510,6 +506,8 @@ gst_audio_src_class_init (GstAudioSrcClass * klass) gstbaseaudiosrc_class->create_ringbuffer = GST_DEBUG_FUNCPTR (gst_audio_src_create_ringbuffer); + + g_type_class_ref (GST_TYPE_AUDIORING_BUFFER); } static void