aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-05-09 14:50:43 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-05-09 14:50:43 +0200
commit0d61ddede7d340ffa1c75a2882e30c455ef3d8b8 (patch)
tree6c6e349b88dc1ed916225f92f8f6a30cfe21e0a3
parent8cd3dafc3ae6a66e4e48a0c7f1ce8340ae172d87 (diff)
v4l2-compliance: if G_FMT returns 0, mark buftype as valid
Currently a buftype was only marked as valid in node->valid_buftypes if G_FMT returned 0 AND the validation of the returned v4l2_format was also successful. But this gave bad knock-on effects in later tests. So mark the buftype as valid if G_FMT returns 0, independent of the later tests. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-compliance/v4l2-test-formats.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp
index ada622ae..f656b3cb 100644
--- a/utils/v4l2-compliance/v4l2-test-formats.cpp
+++ b/utils/v4l2-compliance/v4l2-test-formats.cpp
@@ -576,14 +576,16 @@ int testGetFormats(struct node *node)
for (type = 0; type <= V4L2_BUF_TYPE_LAST; type++) {
createInvalidFmt(fmt, clip, type);
ret = doioctl(node, VIDIOC_G_FMT, &fmt);
+ if (!ret)
+ node->valid_buftypes |= 1 << type;
+
ret = testFormatsType(node, ret, type, fmt);
if (ret && ret != ENOTTY)
return ret;
- if (!ret) {
+ if (!ret)
supported = true;
- node->valid_buftypes |= 1 << type;
- }
+
switch (type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT:

Privacy Policy