提交 ac532128 编写于 作者: S Sakari Ailus 提交者: Mauro Carvalho Chehab

media: vivid: Use v4l2_find_nearest_size

Use v4l2_find_nearest_size instead of a driver specific function to find
nearest matching size.
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 894de53b
......@@ -561,9 +561,8 @@ int vivid_try_fmt_vid_cap(struct file *file, void *priv,
mp->field = vivid_field_cap(dev, mp->field);
if (vivid_is_webcam(dev)) {
const struct v4l2_frmsize_discrete *sz =
v4l2_find_nearest_format(webcam_sizes,
VIVID_WEBCAM_SIZES,
mp->width, mp->height);
v4l2_find_nearest_size(webcam_sizes, width, height,
mp->width, mp->height);
w = sz->width;
h = sz->height;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册