gint step = gst_value_get_int_range_step (subtrahend);
gint val = g_value_get_int (minuend);
+ if (step == 0)
+ return FALSE;
+
/* subtracting a range from an int only works if the int is not in the
* range */
if (val < min || val > max || val % step) {
g_return_val_if_fail (min < max, FALSE);
+ if (step == 0)
+ return FALSE;
+
/* value is outside of the range, return range unchanged */
if (val < min || val > max || val % step) {
if (dest)
}
step = step1;
+ if (step == 0)
+ return FALSE;
+
if (max2 >= max1 && min2 <= min1) {
return FALSE;
} else if (max2 >= max1) {
gint64 step = gst_value_get_int64_range_step (subtrahend);
gint64 val = g_value_get_int64 (minuend);
+ if (step == 0)
+ return FALSE;
/* subtracting a range from an int64 only works if the int64 is not in the
* range */
if (val < min || val > max || val % step) {
g_return_val_if_fail (min < max, FALSE);
+ if (step == 0)
+ return FALSE;
+
/* value is outside of the range, return range unchanged */
if (val < min || val > max || val % step) {
if (dest)
g_assert (FALSE);
return FALSE;
}
+
+ if (step1 == 0)
+ return FALSE;
+
step = step1;
if (max2 >= max1 && min2 <= min1) {
const gint rmin = gst_value_get_int_range_min (value);
const gint rmax = gst_value_get_int_range_max (value);
const gint rstep = gst_value_get_int_range_step (value);
+ if (rstep == 0)
+ return FALSE;
/* note: this will overflow for min 0 and max INT_MAX, but this
would only be equal to a list of INT_MAX elements, which seems
very unlikely */