[Bug 739662] gstobject: Add gst_object_has_parent()
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Nov 10 00:56:25 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=739662
GStreamer | gstreamer (core) | git
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #290309|none |needs-work
status| |
--- Comment #4 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-11-10 08:56:21 UTC ---
Review of attachment 290309:
--> (https://bugzilla.gnome.org/review?bug=739662&attachment=290309)
::: gst/gstobject.c
@@ +800,3 @@
+ if (G_LIKELY (GST_IS_OBJECT (object) && GST_IS_OBJECT (parent))) {
+ GST_OBJECT_LOCK (object);
+ result = GST_OBJECT_PARENT (object) == parent ? TRUE : FALSE;
No need to do "result = condition ? TRUE : FALSE". Just do "result = condition"
:)
::: tests/check/gst/gstobject.c
@@ +380,3 @@
+ result = gst_object_has_parent (object1, object2);
+ fail_if (result == TRUE, "GstFakeObject has a parent");
And don't compare booleans by equality. Just "fail_if (result)"
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list