summaryrefslogtreecommitdiff
path: root/sys/v4l2/gstv4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/v4l2/gstv4l2.c')
-rw-r--r--sys/v4l2/gstv4l2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c
index 97d617b82..83fcc982a 100644
--- a/sys/v4l2/gstv4l2.c
+++ b/sys/v4l2/gstv4l2.c
@@ -168,6 +168,13 @@ gst_v4l2_probe_and_register (GstPlugin * plugin)
gst_v4l2_probe_template_caps (it->device_path, video_fd,
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE));
+ /* Skip devices without any supported formats */
+ if (gst_caps_is_empty (sink_caps) || gst_caps_is_empty (src_caps)) {
+ gst_caps_unref (sink_caps);
+ gst_caps_unref (src_caps);
+ continue;
+ }
+
basename = g_path_get_basename (it->device_path);
if (gst_v4l2_is_video_dec (sink_caps, src_caps))