[gst-cvs] gst-plugins-base: audiosink, audiosrc: do the class_ref() s in the right class_init functions

Tim Mueller tpm at kemper.freedesktop.org
Tue Jun 16 06:20:38 PDT 2009


Module: gst-plugins-base
Branch: master
Commit: 70089160f84d882d1ee7cd1708df1ee87bf69b08
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=70089160f84d882d1ee7cd1708df1ee87bf69b08

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Tue Jun 16 14:05:04 2009 +0100

audiosink, audiosrc: do the class_ref()s in the right class_init functions

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 479267e..2d4bfe5 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 ff183b8..6026734 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





More information about the Gstreamer-commits mailing list