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

Spotted by Philip Jägenstedt. Hopefully fixes #585970 for real.
This commit is contained in:
Tim-Philipp Müller 2009-06-16 14:05:04 +01:00
parent 3767cb6005
commit 70089160f8
2 changed files with 4 additions and 8 deletions

View file

@ -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

View file

@ -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