v4l2-compliance: also check for V4L2_CAP_EXT_PIX_FORMAT in device_caps
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 17 Jul 2014 21:37:53 +0000 (23:37 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Thu, 17 Jul 2014 21:37:53 +0000 (23:37 +0200)
It must be present in both capability sets.

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

index 2aeb236..b8f828b 100644 (file)
@@ -346,12 +346,13 @@ static int testCap(struct node *node)
        fail_on_test(caps == 0);
        fail_on_test(caps & V4L2_CAP_ASYNCIO);
        fail_on_test(!(caps & V4L2_CAP_DEVICE_CAPS));
-       // set by the core, so this really should always be there
-       // for a modern driver.
-       fail_on_test(!(caps & V4L2_CAP_EXT_PIX_FORMAT));
        fail_on_test(dcaps & V4L2_CAP_DEVICE_CAPS);
        fail_on_test(dcaps & ~caps);
        fail_on_test(!(dcaps & caps));
+       // set by the core, so this really should always be there
+       // for a modern driver for both caps and dcaps
+       fail_on_test(!(caps & V4L2_CAP_EXT_PIX_FORMAT));
+       fail_on_test(!(dcaps & V4L2_CAP_EXT_PIX_FORMAT));
        fail_on_test(node->is_video && !(dcaps & video_caps));
        fail_on_test(node->is_radio && !(dcaps & radio_caps));
        // V4L2_CAP_AUDIO is invalid for radio and sdr