Commit cf13135c authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

media: coda: never set infinite timeperframe

v4l2-compliance complains if G_PARM returns 0 in the denominator.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 07b6080d
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment