summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e97eeb5)
raw | patch | inline | side by side (parent: e97eeb5)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Thu, 27 Oct 2011 08:45:41 +0000 (09:45 +0100) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Mon, 7 Nov 2011 15:16:26 +0000 (15:16 +0000) |
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 b9abcf6f457da4f25e54b489af636afdad993748..a2547970fd247179d5cacf8db0b2d389a5b131e3 100644 (file)
--- a/gst/gststructure.c
+++ b/gst/gststructure.c
*
* First caps subtraction needs to return a non-empty set, second
* subtractions needs to give en empty set.
+ * Both substractions are switched below, as it's faster that way.
*/
- if (gst_value_subtract (&subtraction, other, value)) {
- g_value_unset (&subtraction);
- /* !empty result, swapping must be empty */
- if (!gst_value_subtract (&subtraction, value, other))
+ if (!gst_value_subtract (&subtraction, value, other)) {
+ if (gst_value_subtract (&subtraction, other, value)) {
+ g_value_unset (&subtraction);
return TRUE;
-
+ }
+ } else {
g_value_unset (&subtraction);
}
return FALSE;