mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
miniobject: avoid duplicate type check when freeing miniobject
gst_mini_object_unref() has guards that check the type already, so we don't really need to re-check it here again while getting the class (there's not really much point to that anyway, since we don't check the return value of the get_class, so we'd crash anyway if we're not dealing with a mini object, the only question would be if there'd be a warning before the crash or not).
This commit is contained in:
parent
2c4afb966d
commit
0dbb0f203e
1 changed files with 4 additions and 1 deletions
|
@ -43,6 +43,9 @@
|
|||
static GstAllocTrace *_gst_mini_object_trace;
|
||||
#endif
|
||||
|
||||
#define GST_MINI_OBJECT_GET_CLASS_UNCHECKED(obj) \
|
||||
((GstMiniObjectClass *) (((GTypeInstance*)(obj))->g_class))
|
||||
|
||||
#if 0
|
||||
static void gst_mini_object_base_init (gpointer g_class);
|
||||
static void gst_mini_object_base_finalize (gpointer g_class);
|
||||
|
@ -330,7 +333,7 @@ gst_mini_object_free (GstMiniObject * mini_object)
|
|||
|
||||
g_atomic_int_inc (&mini_object->refcount);
|
||||
|
||||
mo_class = GST_MINI_OBJECT_GET_CLASS (mini_object);
|
||||
mo_class = GST_MINI_OBJECT_GET_CLASS_UNCHECKED (mini_object);
|
||||
mo_class->finalize (mini_object);
|
||||
|
||||
/* decrement the refcount again, if the subclass recycled the object we don't
|
||||
|
|
Loading…
Reference in a new issue