summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29c97fe)
raw | patch | inline | side by side (parent: 29c97fe)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Thu, 27 Oct 2011 10:41:30 +0000 (11:41 +0100) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Mon, 7 Nov 2011 15:17:04 +0000 (15:17 +0000) |
If two values can be ordered, but are unequal, they are
necessarily distinct, thus one cannot be a subset of the other.
https://bugzilla.gnome.org/show_bug.cgi?id=662777
necessarily distinct, thus one cannot be a subset of the other.
https://bugzilla.gnome.org/show_bug.cgi?id=662777
gst/gststructure.c | patch | blob | history |
diff --git a/gst/gststructure.c b/gst/gststructure.c
index f06049c9ca050ceb0a1384bc2bdc92492e545203..9c0be012207ae8402b252daf726f97bbb8037bba 100644 (file)
--- a/gst/gststructure.c
+++ b/gst/gststructure.c
{
GstStructure *superset = user_data;
const GValue *other;
+ int comparison;
if (!(other = gst_structure_id_get_value (superset, field_id)))
/* field is missing in the superset => is subset */
return TRUE;
+ comparison = gst_value_compare (other, value);
+
/* equal values are subset */
- if (gst_value_compare (other, value) == GST_VALUE_EQUAL)
+ if (comparison == GST_VALUE_EQUAL)
return TRUE;
+ /* ordered, but unequal, values are not */
+ if (comparison != GST_VALUE_UNORDERED)
+ return FALSE;
+
/*
* 1 - [1,2] = empty
* -> !subset