Commit b31e341b authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (4584): Fix VIDIOC_S_FMT min/max check in pvrusb2

Acked-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f2a49bc7
...@@ -468,18 +468,18 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, ...@@ -468,18 +468,18 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
lmin = pvr2_ctrl_get_min(hcp); lmin = pvr2_ctrl_get_min(hcp);
lmax = pvr2_ctrl_get_max(hcp); lmax = pvr2_ctrl_get_max(hcp);
if (h < lmin) {
h = lmin;
} else if (h > lmax) {
h = lmax;
}
lmin = pvr2_ctrl_get_min(vcp);
lmax = pvr2_ctrl_get_max(vcp);
if (w < lmin) { if (w < lmin) {
w = lmin; w = lmin;
} else if (w > lmax) { } else if (w > lmax) {
w = lmax; w = lmax;
} }
lmin = pvr2_ctrl_get_min(vcp);
lmax = pvr2_ctrl_get_max(vcp);
if (h < lmin) {
h = lmin;
} else if (h > lmax) {
h = lmax;
}
memcpy(vf, &pvr_format[PVR_FORMAT_PIX], memcpy(vf, &pvr_format[PVR_FORMAT_PIX],
sizeof(struct v4l2_format)); sizeof(struct v4l2_format));
......
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