Add back function guard that checks the refcount in a read-only
operation first, and bail out without modifying the passed-in
memory if it's clearly not a valid mini object. Otherwise we
probably cause more harm than good. We keep the second sanity
check based on the 'real refcount' at the time of the unref
around for now too.
https://bugzilla.gnome.org/show_bug.cgi?id=784383
gint old_refcount, new_refcount;
g_return_if_fail (mini_object != NULL);
+ g_return_if_fail (GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) > 0);
old_refcount = g_atomic_int_add (&mini_object->refcount, -1);
new_refcount = old_refcount - 1;