There are objects where maximum is not multiplication of the step,
e.g. there was a combination where max was 65535 with step 2.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7961>
maxw = MIN (size.stepwise.max_width, G_MAXINT);
maxh = MIN (size.stepwise.max_height, G_MAXINT);
- /* FIXME: check for sanity and that min/max are multiples of the steps */
+ /* ensure maxes are multiples of the steps */
+ maxw -= maxw % step_w;
+ maxh -= maxh % step_h;
+
+ /* FIXME: check for sanity */
/* we only query details for the max width/height since it's likely the
* most restricted if there are any resolution-dependent restrictions */