summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice/v4l2_m2mdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/v4l2_videodevice/v4l2_m2mdevice.cpp')
-rw-r--r--test/v4l2_videodevice/v4l2_m2mdevice.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
index 852b853f..c45f581a 100644
--- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
+++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
@@ -95,6 +95,11 @@ protected:
V4L2VideoDevice *capture = vim2m_->capture();
V4L2VideoDevice *output = vim2m_->output();
+ if (capture->controls().empty() || output->controls().empty()) {
+ cerr << "VIM2M device has no control" << endl;
+ return TestFail;
+ }
+
V4L2DeviceFormat format = {};
if (capture->getFormat(&format)) {
cerr << "Failed to get capture format" << endl;