gstvalue: Fix comparison of int/int64 range

Checking step three times seems unnecessary.
A similar bug was fixed for double range in
commit 3ea6b04c10
This commit is contained in:
Haakon Sporsheim 2014-03-25 12:23:32 +01:00 committed by Edward Hervey
parent e06f9667b0
commit e3388c22c2

View file

@ -1111,8 +1111,8 @@ gst_value_compare_int_range (const GValue * value1, const GValue * value2)
and bounds lie on the same value */
if (n1 > 1) {
if (INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2) &&
INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2) &&
INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2)) {
INT_RANGE_MIN (value1) == INT_RANGE_MIN (value2) &&
INT_RANGE_MAX (value1) == INT_RANGE_MAX (value2)) {
return GST_VALUE_EQUAL;
}
return GST_VALUE_UNORDERED;
@ -1366,8 +1366,8 @@ gst_value_compare_int64_range (const GValue * value1, const GValue * value2)
and bounds lie on the same value */
if (n1 > 1) {
if (INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2) &&
INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2) &&
INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2)) {
INT64_RANGE_MIN (value1) == INT64_RANGE_MIN (value2) &&
INT64_RANGE_MAX (value1) == INT64_RANGE_MAX (value2)) {
return GST_VALUE_EQUAL;
}
return GST_VALUE_UNORDERED;