aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-04-22 13:42:15 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:44 -0400
commitc9aec06f4a6029edd84022276e2bfadab5e85ade (patch)
treedca253eacb2e50c0bec58fb36624430f86c13b47
parent88ab075aee974f70b7b0273a964810698c8a5b95 (diff)
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: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index f562cbbadc16..1beb296a1763 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -828,8 +828,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
828 case VIDIOC_CROPCAP: { 828 case VIDIOC_CROPCAP: {
829 struct v4l2_cropcap *cropcap = arg; 829 struct v4l2_cropcap *cropcap = arg;
830 830
831 if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE && 831 if (cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
832 cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
833 return -EINVAL; 832 return -EINVAL;
834 cropcap->bounds.top = cropcap->bounds.left = 0; 833 cropcap->bounds.top = cropcap->bounds.left = 0;
835 cropcap->bounds.width = 720; 834 cropcap->bounds.width = 720;
@@ -874,9 +873,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
874 } 873 }
875 return -EINVAL; 874 return -EINVAL;
876 } 875 }
877 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 876 return -EINVAL;
878 return -EINVAL;
879 return itv->video_dec_func(itv, VIDIOC_S_CROP, arg);
880 } 877 }
881 878
882 case VIDIOC_G_CROP: { 879 case VIDIOC_G_CROP: {
@@ -890,9 +887,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
890 crop->c = itv->main_rect; 887 crop->c = itv->main_rect;
891 return 0; 888 return 0;
892 } 889 }
893 if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 890 return -EINVAL;
894 return -EINVAL;
895 return itv->video_dec_func(itv, VIDIOC_G_CROP, arg);
896 } 891 }
897 892
898 case VIDIOC_ENUM_FMT: { 893 case VIDIOC_ENUM_FMT: {