mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
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:
parent
e06f9667b0
commit
e3388c22c2
1 changed files with 4 additions and 4 deletions
|
@ -1111,8 +1111,8 @@ gst_value_compare_int_range (const GValue * value1, const GValue * value2)
|
||||||
and bounds lie on the same value */
|
and bounds lie on the same value */
|
||||||
if (n1 > 1) {
|
if (n1 > 1) {
|
||||||
if (INT_RANGE_STEP (value1) == INT_RANGE_STEP (value2) &&
|
if (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_STEP (value1) == INT_RANGE_STEP (value2)) {
|
INT_RANGE_MAX (value1) == INT_RANGE_MAX (value2)) {
|
||||||
return GST_VALUE_EQUAL;
|
return GST_VALUE_EQUAL;
|
||||||
}
|
}
|
||||||
return GST_VALUE_UNORDERED;
|
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 */
|
and bounds lie on the same value */
|
||||||
if (n1 > 1) {
|
if (n1 > 1) {
|
||||||
if (INT64_RANGE_STEP (value1) == INT64_RANGE_STEP (value2) &&
|
if (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_STEP (value1) == INT64_RANGE_STEP (value2)) {
|
INT64_RANGE_MAX (value1) == INT64_RANGE_MAX (value2)) {
|
||||||
return GST_VALUE_EQUAL;
|
return GST_VALUE_EQUAL;
|
||||||
}
|
}
|
||||||
return GST_VALUE_UNORDERED;
|
return GST_VALUE_UNORDERED;
|
||||||
|
|
Loading…
Reference in a new issue