Frame intervals exposed as an interval and step (so-called step-wise)
are restricted by the V4L2 API to a single enumeration entry. Return an
error when the index is not zero.
Reported-by: Alexey Smirnoff <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
[
[email protected]: add a missing collon at the end of the return
statement, in order to avoid compilation breakage]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
uvc_simplify_fraction(&fival->discrete.numerator,
&fival->discrete.denominator, 8, 333);
} else {
+ if (fival->index)
+ return -EINVAL;
+
fival->type = V4L2_FRMIVAL_TYPE_STEPWISE;
fival->stepwise.min.numerator = frame->dwFrameInterval[0];
fival->stepwise.min.denominator = 10000000;