sys/: Explicitly create our custom buffer classes at a thread-safe location as well...
authorTim-Philipp Müller <tim@centricular.net>
Fri, 27 Oct 2006 11:57:18 +0000 (11:57 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 27 Oct 2006 11:57:18 +0000 (11:57 +0000)
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
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c

index 4917f61..172d3b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-27  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * 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  <tim at centricular dot net>
 
        * gst-libs/gst/riff/riff-read.c: (freeform_string_to_utf8),
index d90e464..16ffcf9 100644 (file)
@@ -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;
index 1ea8377..4f52f31 100644 (file)
@@ -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;