mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gststructure: rejig test ordering for speed
https://bugzilla.gnome.org/show_bug.cgi?id=662777
This commit is contained in:
parent
e97eeb5cd4
commit
7090257a83
1 changed files with 6 additions and 5 deletions
|
@ -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
|
* First caps subtraction needs to return a non-empty set, second
|
||||||
* subtractions needs to give en empty set.
|
* 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)) {
|
if (!gst_value_subtract (&subtraction, value, other)) {
|
||||||
g_value_unset (&subtraction);
|
if (gst_value_subtract (&subtraction, other, value)) {
|
||||||
/* !empty result, swapping must be empty */
|
g_value_unset (&subtraction);
|
||||||
if (!gst_value_subtract (&subtraction, value, other))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
g_value_unset (&subtraction);
|
g_value_unset (&subtraction);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue