mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 17:43:59 +00:00
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: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
894de53b49
commit
ac53212880
@ -561,9 +561,8 @@ int vivid_try_fmt_vid_cap(struct file *file, void *priv,
|
|||||||
mp->field = vivid_field_cap(dev, mp->field);
|
mp->field = vivid_field_cap(dev, mp->field);
|
||||||
if (vivid_is_webcam(dev)) {
|
if (vivid_is_webcam(dev)) {
|
||||||
const struct v4l2_frmsize_discrete *sz =
|
const struct v4l2_frmsize_discrete *sz =
|
||||||
v4l2_find_nearest_format(webcam_sizes,
|
v4l2_find_nearest_size(webcam_sizes, width, height,
|
||||||
VIVID_WEBCAM_SIZES,
|
mp->width, mp->height);
|
||||||
mp->width, mp->height);
|
|
||||||
|
|
||||||
w = sz->width;
|
w = sz->width;
|
||||||
h = sz->height;
|
h = sz->height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user