summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l
diff options
context:
space:
mode:
authorhans@localhost.localdomain <hans@localhost.localdomain>2008-07-29 23:15:36 +0200
committerhans@localhost.localdomain <hans@localhost.localdomain>2008-07-29 23:15:36 +0200
commita94d7a5e69e739ce5afae5a7c8d02dcf68c04b91 (patch)
tree2bd3710a0d096bfb0144244ce21ab9b58096a4af /v4l2-apps/lib/libv4l
parent55b3e527968b0644e7eaf3aae2b873249400b614 (diff)
downloadmediapointer-dvb-s2-a94d7a5e69e739ce5afae5a7c8d02dcf68c04b91.tar.gz
mediapointer-dvb-s2-a94d7a5e69e739ce5afae5a7c8d02dcf68c04b91.tar.bz2
libv4l: check capabilities for streaming
From: Hans de Goede <j.w.r.degoede@hhs.nl> libv4l: check capabilities for streaming Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'v4l2-apps/lib/libv4l')
-rw-r--r--v4l2-apps/lib/libv4l/ChangeLog2
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/libv4l2.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/v4l2-apps/lib/libv4l/ChangeLog b/v4l2-apps/lib/libv4l/ChangeLog
index 3cdabde0d..3fec060c3 100644
--- a/v4l2-apps/lib/libv4l/ChangeLog
+++ b/v4l2-apps/lib/libv4l/ChangeLog
@@ -2,6 +2,8 @@ libv4l-0.3.8
------------
* work around wrong REQUEST_BUFFERS ioctl return code from certain drivers
* add pkg-config (.pc) files for easier detection if libv4l is available
+* check capabilities for streaming, if the driver cannot do streaming don't
+ insert ourselves between the application and the driver
libv4l-0.3.7
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 */