Commit 7090257a authored by Vincent Penquerc'h's avatar Vincent Penquerc'h
Browse files

gststructure: rejig test ordering for speed

https://bugzilla.gnome.org/show_bug.cgi?id=662777
parent e97eeb5c
......@@ -3137,13 +3137,14 @@ gst_caps_structure_is_subset_field (GQuark field_id, const GValue * value,
*
* 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment