v4l2src: Use fraction compare util function.
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sun, 7 Aug 2011 10:23:26 +0000 (12:23 +0200)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sun, 7 Aug 2011 14:41:53 +0000 (16:41 +0200)
commit8edb15d12f08f109a06d65b91c3aeb1a6127de6b
treeded378d74cdf2e8c1b7558398be5b41693ac7cad
parent1438bf26ac6f2cc5c1cd3c6d6cba7ddc9ccda390
v4l2src: Use fraction compare util function.

Use the fraction compare utility to compare function, not the
handcrafted one. The handcrafted one is buggy as it doesn't take into
account rounding error. For example comparing a framerate of 20/1 on a
camera configured as 30/1 fps would yield true: 1 == (1 * 20)/30 and not
re-configure the camera. Fixes #656104
sys/v4l2/v4l2src_calls.c