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

V4L/DVB (7244): ivtv: CROP is not supported for video capture

CROPCAP suggests that video capture supports cropping, but this is not the
case.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 88ab075a
...@@ -828,8 +828,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void ...@@ -828,8 +828,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
case VIDIOC_CROPCAP: { case VIDIOC_CROPCAP: {
struct v4l2_cropcap *cropcap = arg; struct v4l2_cropcap *cropcap = arg;
if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && if (cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
return -EINVAL; return -EINVAL;
cropcap->bounds.top = cropcap->bounds.left = 0; cropcap->bounds.top = cropcap->bounds.left = 0;
cropcap->bounds.width = 720; cropcap->bounds.width = 720;
...@@ -874,9 +873,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void ...@@ -874,9 +873,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
} }
return -EINVAL; return -EINVAL;
} }
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL;
return -EINVAL;
return itv->video_dec_func(itv, VIDIOC_S_CROP, arg);
} }
case VIDIOC_G_CROP: { case VIDIOC_G_CROP: {
...@@ -890,9 +887,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void ...@@ -890,9 +887,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
crop->c = itv->main_rect; crop->c = itv->main_rect;
return 0; return 0;
} }
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL;
return -EINVAL;
return itv->video_dec_func(itv, VIDIOC_G_CROP, arg);
} }
case VIDIOC_ENUM_FMT: { case VIDIOC_ENUM_FMT: {
......
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