structure: identical structures are definitely equal
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 29 Oct 2011 22:52:22 +0000 (23:52 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 29 Oct 2011 22:52:22 +0000 (23:52 +0100)
gst/gststructure.c

index 271ef87..b9abcf6 100644 (file)
@@ -2946,6 +2946,9 @@ gst_structure_is_equal (const GstStructure * structure1,
   g_return_val_if_fail (GST_IS_STRUCTURE (structure1), FALSE);
   g_return_val_if_fail (GST_IS_STRUCTURE (structure2), FALSE);
 
+  if (G_UNLIKELY (structure1 == structure2))
+    return TRUE;
+
   if (structure1->name != structure2->name) {
     return FALSE;
   }