aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-07-22 09:33:46 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2014-07-22 09:35:48 +0200
commitcc2356cfc1187205fbfe99278b178082f075e49e (patch)
treec1e60c48e42388d58ccf3aa7bc1d8c4f43f3fe31
parente1f3bf00046a5cf305b40b835dc244fdc0134468 (diff)
v4l2-compliance: add sdr buffersize check
Make sure buffersize is set. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/v4l2-compliance/v4l-helpers.h2
-rw-r--r--utils/v4l2-compliance/v4l2-test-formats.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l-helpers.h b/utils/v4l2-compliance/v4l-helpers.h
index 1b7546c5..42f48bfb 100644
--- a/utils/v4l2-compliance/v4l-helpers.h
+++ b/utils/v4l2-compliance/v4l-helpers.h
@@ -724,6 +724,8 @@ v4l_format_g_sizeimage(const struct v4l2_format *fmt, unsigned plane)
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
return plane ? 0 : fmt->fmt.sliced.io_size;
+ case V4L2_BUF_TYPE_SDR_CAPTURE:
+ return plane ? 0 : fmt->fmt.sdr.buffersize;
default:
return 0;
}
diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp
index 6746c0db..9cd7b660 100644
--- a/utils/v4l2-compliance/v4l2-test-formats.cpp
+++ b/utils/v4l2-compliance/v4l2-test-formats.cpp
@@ -517,6 +517,7 @@ static int testFormatsType(struct node *node, int ret, unsigned type, struct v4
if (set.find(sdr.pixelformat) == set.end())
return fail("unknown pixelformat %08x for buftype %d\n",
pix.pixelformat, type);
+ fail_on_test(sdr.buffersize == 0);
fail_on_test(check_0(sdr.reserved, sizeof(sdr.reserved)));
break;
case V4L2_BUF_TYPE_PRIVATE:

Privacy Policy