v4l2-ctl: streamon/streamoff expect proper stream type.
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 29 Mar 2011 19:39:33 +0000 (21:39 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Tue, 29 Mar 2011 19:39:33 +0000 (21:39 +0200)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-ctl/v4l2-ctl.cpp

index 3db26ab32bac77a8475dfb18c225064bd69423b9..957ae465711d49d4d6c1ff358b015f3ba68e4c7c 100644 (file)
@@ -2521,8 +2521,9 @@ int main(int argc, char **argv)
        /* Set options */
 
        if (options[OptStreamOff]) {
-               int dummy = 0;
-               doioctl(fd, VIDIOC_STREAMOFF, &dummy);
+               int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+               doioctl(fd, VIDIOC_STREAMOFF, &type);
        }
 
        if (options[OptSetPriority]) {
@@ -3459,8 +3460,9 @@ int main(int argc, char **argv)
                }
        }
        if (options[OptStreamOn]) {
-               int dummy = 0;
-               doioctl(fd, VIDIOC_STREAMON, &dummy);
+               int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+               doioctl(fd, VIDIOC_STREAMON, &type);
        }
 
        if (options[OptWaitForEvent]) {