From cdde34f0ee4d3df5ccba84d2b4e9af1a1670e8fc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 2 Nov 2010 12:58:14 +0100 Subject: [PATCH] fix compilation --- gst/gstbuffer.c | 2 +- gst/gstbufferlist.c | 1 - gst/gstcaps.c | 2 +- gst/gstelementfactory.c | 4 ++-- gst/gstminiobject.c | 3 +-- gst/gstregistrychunks.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index 4bd7b62ceb..c204d9e29f 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -170,7 +170,7 @@ _gst_buffer_initialize (void) /* the GstMiniObject types need to be class_ref'd once before it can be * done from multiple threads; * see http://bugzilla.gnome.org/show_bug.cgi?id=304551 */ - g_type_class_ref (gst_buffer_get_type ()); + gst_buffer_get_type (); #ifdef HAVE_GETPAGESIZE #ifdef BUFFER_ALIGNMENT_PAGESIZE _gst_buffer_data_alignment = getpagesize (); diff --git a/gst/gstbufferlist.c b/gst/gstbufferlist.c index e34269e80d..08633baca4 100644 --- a/gst/gstbufferlist.c +++ b/gst/gstbufferlist.c @@ -166,7 +166,6 @@ _gst_buffer_list_initialize (void) { GType type = gst_buffer_list_get_type (); - g_type_class_ref (type); _gst_buffer_list_type = type; } diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 7245d64ece..9ada2af701 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -110,7 +110,7 @@ /* quick way to append a structure without checking the args */ #define gst_caps_append_structure_unchecked(caps, structure) G_STMT_START{\ GstStructure *__s=structure; \ - gst_structure_set_parent_refcount (__s, &caps->refcount); \ + gst_structure_set_parent_refcount (__s, &GST_MINI_OBJECT_REFCOUNT(caps)); \ g_ptr_array_add (caps->structs, __s); \ }G_STMT_END diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index 68d9438539..e19914d577 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -266,8 +266,8 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank, newt->name_template = g_intern_string (templ->name_template); newt->direction = templ->direction; newt->presence = templ->presence; - newt->static_caps.caps.refcount = 0; - newt->static_caps.string = g_intern_string (caps_string); + newt->static_caps.caps.mini_object.refcount = 0; + newt->static_caps.string = gst_caps_to_string (templ->caps); factory->staticpadtemplates = g_list_append (factory->staticpadtemplates, newt); diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index 35a6f6b06a..d35a0751d8 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -227,7 +227,6 @@ gst_mini_object_ref (GstMiniObject * mini_object) * the object g_return_val_if_fail (mini_object->refcount > 0, NULL); */ - g_return_val_if_fail (GST_IS_MINI_OBJECT (mini_object), NULL); GST_CAT_TRACE (GST_CAT_REFCOUNTING, "%p ref %d->%d", mini_object, GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object), @@ -248,7 +247,7 @@ gst_mini_object_ref (GstMiniObject * mini_object) void gst_mini_object_unref (GstMiniObject * mini_object) { - g_return_if_fail (GST_IS_MINI_OBJECT (mini_object)); + g_return_if_fail (mini_object != NULL); g_return_if_fail (mini_object->refcount > 0); GST_CAT_TRACE (GST_CAT_REFCOUNTING, "%p unref %d->%d", diff --git a/gst/gstregistrychunks.c b/gst/gstregistrychunks.c index 3dee5a1364..0ced3a089d 100644 --- a/gst/gstregistrychunks.c +++ b/gst/gstregistrychunks.c @@ -493,7 +493,7 @@ gst_registry_chunks_load_pad_template (GstElementFactory * factory, gchar ** in, template = g_slice_new (GstStaticPadTemplate); template->presence = pt->presence; template->direction = pt->direction; - template->static_caps.caps.refcount = 0; + template->static_caps.caps.mini_object.refcount = 0; /* unpack pad template strings */ unpack_const_string (*in, template->name_template, end, fail);