V4L/DVB (7244): ivtv: CROP is not supported for video capture
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 22 Apr 2008 17:42:15 +0000 (14:42 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:44 +0000 (14:07 -0300)
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>
drivers/media/video/ivtv/ivtv-ioctl.c

index f562cbbadc169e26ee5671891811d911a341b93e..1beb296a17635eae7e107dbc1aae2a139a67f793 100644 (file)
@@ -828,8 +828,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
        case VIDIOC_CROPCAP: {
                struct v4l2_cropcap *cropcap = arg;
 
-               if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
-                   cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
+               if (cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
                        return -EINVAL;
                cropcap->bounds.top = cropcap->bounds.left = 0;
                cropcap->bounds.width = 720;
@@ -874,9 +873,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
                        }
                        return -EINVAL;
                }
-               if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-                       return -EINVAL;
-               return itv->video_dec_func(itv, VIDIOC_S_CROP, arg);
+               return -EINVAL;
        }
 
        case VIDIOC_G_CROP: {
@@ -890,9 +887,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
                                crop->c = itv->main_rect;
                        return 0;
                }
-               if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-                       return -EINVAL;
-               return itv->video_dec_func(itv, VIDIOC_G_CROP, arg);
+               return -EINVAL;
        }
 
        case VIDIOC_ENUM_FMT: {