From 3feb4bc8c56e717e7ab9510cbb9cba8be2f9eb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 10 Jan 2008 17:55:53 +0000 Subject: [PATCH] gst-libs/gst/audio/: Ref audio clock class from a thread-safe context to make sure however unlikely that may be in pr... Original commit message from CVS: * gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_class_init): * gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_class_init): Ref audio clock class from a thread-safe context to make sure we're not bit by GObjects lack of thread-safety here (#349410), however unlikely that may be in practice. --- ChangeLog | 10 ++++++++++ gst-libs/gst/audio/gstbaseaudiosink.c | 4 ++++ gst-libs/gst/audio/gstbaseaudiosrc.c | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 01767551bd..24bdd84f75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-01-10 Tim-Philipp Müller + + * gst-libs/gst/audio/gstbaseaudiosink.c: + (gst_base_audio_sink_class_init): + * gst-libs/gst/audio/gstbaseaudiosrc.c: + (gst_base_audio_src_class_init): + Ref audio clock class from a thread-safe context to make sure + we're not bit by GObjects lack of thread-safety here (#349410), + however unlikely that may be in practice. + 2008-01-10 Sebastian Dröge * autogen.sh: diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index a7d8534910..290cfe3516 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -209,6 +209,10 @@ gst_base_audio_sink_class_init (GstBaseAudioSinkClass * klass) GST_DEBUG_FUNCPTR (gst_base_audio_sink_async_play); gstbasesink_class->activate_pull = GST_DEBUG_FUNCPTR (gst_base_audio_sink_activate_pull); + + /* ref class from a thread-safe context to work around missing bit of + * thread-safety in GObject */ + g_type_class_ref (GST_TYPE_AUDIO_CLOCK); } static void diff --git a/gst-libs/gst/audio/gstbaseaudiosrc.c b/gst-libs/gst/audio/gstbaseaudiosrc.c index c21c1a3849..5716984b1f 100644 --- a/gst-libs/gst/audio/gstbaseaudiosrc.c +++ b/gst-libs/gst/audio/gstbaseaudiosrc.c @@ -169,6 +169,10 @@ gst_base_audio_src_class_init (GstBaseAudioSrcClass * klass) gstbasesrc_class->check_get_range = GST_DEBUG_FUNCPTR (gst_base_audio_src_check_get_range); gstbasesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_base_audio_src_fixate); + + /* ref class from a thread-safe context to work around missing bit of + * thread-safety in GObject */ + g_type_class_ref (GST_TYPE_AUDIO_CLOCK); } static void