From a74bb753c3f88432ff232517bb4d3c6caa531c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 27 Oct 2006 11:57:18 +0000 Subject: [PATCH] sys/: Explicitly create our custom buffer classes at a thread-safe location as well, since g_type_class_ref() doesn't... Original commit message from CVS: * sys/ximage/ximagesink.c: (gst_ximagesink_get_type): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_type): Explicitly create our custom buffer classes at a thread-safe location as well, since g_type_class_ref() doesn't seem to be entirely thread-safe either (#365501; also see #349410). --- ChangeLog | 8 ++++++++ sys/ximage/ximagesink.c | 7 ++++--- sys/xvimage/xvimagesink.c | 7 ++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4917f61f1f..172d3b846f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-10-27 Tim-Philipp Müller + + * sys/ximage/ximagesink.c: (gst_ximagesink_get_type): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_type): + Explicitly create our custom buffer classes at a thread-safe + location as well, since g_type_class_ref() doesn't seem to be + entirely thread-safe either (#365501; also see #349410). + 2006-10-26 Tim-Philipp Müller * gst-libs/gst/riff/riff-read.c: (freeform_string_to_utf8), diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index d90e4640e0..16ffcf9673 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -2101,9 +2101,10 @@ gst_ximagesink_get_type (void) g_type_add_interface_static (ximagesink_type, GST_TYPE_X_OVERLAY, &overlay_info); - /* register type in a more safe place instead of at runtime since the - * type registration is not threadsafe. */ - gst_ximage_buffer_get_type (); + /* register type and create class in a more safe place instead of at + * runtime since the type registration and class creation is not + * threadsafe. */ + g_type_class_ref (gst_ximage_buffer_get_type ()); } return ximagesink_type; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 1ea83775fc..4f52f31b33 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -2794,9 +2794,10 @@ gst_xvimagesink_get_type (void) g_type_add_interface_static (xvimagesink_type, GST_TYPE_COLOR_BALANCE, &colorbalance_info); - /* make sure type is registered and not at runtime as this is not - * threadsafe */ - gst_xvimage_buffer_get_type (); + /* register type and create class in a more safe place instead of at + * runtime since the type registration and class creation is not + * threadsafe. */ + g_type_class_ref (gst_xvimage_buffer_get_type ()); } return xvimagesink_type;