media: coda: never set infinite timeperframe
v4l2-compliance complains if G_PARM returns 0 in the denominator. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
07b6080d4e
commit
cf13135cf5
|
@ -1113,10 +1113,10 @@ static void coda_approximate_timeperframe(struct v4l2_fract *timeperframe)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Upper bound is 65536/1, map everything above to infinity */
|
||||
/* Upper bound is 65536/1 */
|
||||
if (s.denominator == 0 || s.numerator / s.denominator > 65536) {
|
||||
timeperframe->numerator = 1;
|
||||
timeperframe->denominator = 0;
|
||||
timeperframe->numerator = 65536;
|
||||
timeperframe->denominator = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue