mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 19:18:31 +00:00
v4l2object: Fixed incorrect maximum value for int range
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/7953>
This commit is contained in:
parent
6f20cd69fe
commit
7008e76c62
1 changed files with 5 additions and 1 deletions
|
@ -2894,7 +2894,11 @@ gst_v4l2_object_probe_caps_for_format (GstV4l2Object * v4l2object,
|
|||
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 min width/height in order to allow for
|
||||
a big range of frameintervals.
|
||||
|
|
Loading…
Reference in a new issue