From e3388c22c2daa73f33080025148d9570be5eb446 Mon Sep 17 00:00:00 2001 From: Haakon Sporsheim Date: Tue, 25 Mar 2014 12:23:32 +0100 Subject: [PATCH] gstvalue: Fix comparison of int/int64 range Checking step three times seems unnecessary. A similar bug was fixed for double range in commit 3ea6b04c10b10fde9d62190068f274b940edef07 --- gst/gstvalue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 528932d..97676ab 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -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; -- 2.7.4