v4l2-ctl: is_mplane was never set.
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 22 Feb 2014 09:46:32 +0000 (10:46 +0100)
committerHans Verkuil <hans.verkuil@cisco.com>
Sat, 22 Feb 2014 09:46:32 +0000 (10:46 +0100)
Since is_mplane was always false using the streaming options with multiplanar
formats always failed. Fixed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-ctl/v4l2-ctl-streaming.cpp

index 0dbe855..4918fa9 100644 (file)
@@ -236,6 +236,12 @@ public:
        {
                type = is_output ? vidout_buftype : vidcap_buftype;
                memory = is_mmap ? V4L2_MEMORY_MMAP : V4L2_MEMORY_USERPTR;
+               if (is_output)
+                       is_mplane = capabilities & (V4L2_CAP_VIDEO_M2M_MPLANE |
+                                                   V4L2_CAP_VIDEO_OUTPUT_MPLANE);
+               else
+                       is_mplane = capabilities & (V4L2_CAP_VIDEO_M2M_MPLANE |
+                                                   V4L2_CAP_VIDEO_CAPTURE_MPLANE);
        }
 
 public: