From a94d7a5e69e739ce5afae5a7c8d02dcf68c04b91 Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Tue, 29 Jul 2008 23:15:36 +0200 Subject: libv4l: check capabilities for streaming From: Hans de Goede libv4l: check capabilities for streaming Signed-off-by: Hans de Goede --- v4l2-apps/lib/libv4l/libv4l2/libv4l2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'v4l2-apps/lib/libv4l/libv4l2') diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c index b2ab4dede..95c581079 100644 --- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c @@ -386,8 +386,10 @@ int v4l2_fd_open(int fd, int v4l2_flags) return -1; } - /* we only add functionality for video capture devices */ - if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) + /* we only add functionality for video capture devices, and we do not + handle devices which don't do mmap */ + if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) || + !(cap.capabilities & V4L2_CAP_STREAMING)) return fd; /* Get current cam format */ -- cgit v1.2.3