summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l2
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2008-07-30 20:07:58 -0700
committerBrandon Philips <brandon@ifup.org>2008-07-30 20:07:58 -0700
commita9cbfb5bdc82fdb04c1023f3a4bc1f5bd4a6a4a8 (patch)
treeb4ab458f7b406be056db25856a97995c1b597cbd /v4l2-apps/lib/libv4l/libv4l2
parentfeec7dd735a92d1d390cc0669f879e2b6d36389e (diff)
downloadmediapointer-dvb-s2-a9cbfb5bdc82fdb04c1023f3a4bc1f5bd4a6a4a8.tar.gz
mediapointer-dvb-s2-a9cbfb5bdc82fdb04c1023f3a4bc1f5bd4a6a4a8.tar.bz2
libv4l: add /dev/v4l/ to the paths supported by open() override
Signed-off-by: Brandon Philips <bphilips@suse.de>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l2')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/libv4l2.c12
-rw-r--r--v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
index f71d176b5..174c05b36 100644
--- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
+++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c
@@ -35,12 +35,12 @@
capture devices.
2) libv4l2 is the base of the v4l2convert.so wrapper lib, which is a .so
which can be LD_PRELOAD-ed and the overrules the libc's open/close/etc,
- and when opening /dev/videoX calls v4l2_open. Because we behave as the
- regular counterpart when the fd is not known (instead of say throwing
- an error), v4l2convert.so can simply call the v4l2_ prefixed function
- for all wrapped functions (except for v4l2_open which will fail when not
- called on a v4l2 device). This way the wrapper does not have to keep
- track of which fd's are being handled by libv4l2, as libv4l2 already
+ and when opening /dev/videoX or /dev/v4l/ calls v4l2_open. Because we
+ behave as the regular counterpart when the fd is not known (instead of say
+ throwing an error), v4l2convert.so can simply call the v4l2_ prefixed
+ function for all wrapped functions (except for v4l2_open which will fail
+ when not called on a v4l2 device). This way the wrapper does not have to
+ keep track of which fd's are being handled by libv4l2, as libv4l2 already
keeps track of this itself.
This also means that libv4l2 may not use any of the regular functions
diff --git a/v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c b/v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c
index 7db1ca6d6..7b64bc018 100644
--- a/v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c
+++ b/v4l2-apps/lib/libv4l/libv4l2/v4l2convert.c
@@ -66,7 +66,7 @@ int open (const char *file, int oflag, ...)
return fd;
/* check if we're opening a video4linux2 device */
- if (strncmp(file, "/dev/video", 10))
+ if (strncmp(file, "/dev/video", 10) && strncmp(file, "/dev/v4l/", 9))
return fd;
/* check that this is an v4l2 device, libv4l2 only supports v4l2 devices */