summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-22 10:34:29 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-08-22 10:34:29 -0300
commit4d3f684d3b6ab28ec9e251fff156d0b0f53d0517 (patch)
treef82a2ae2dc042d6d1de61f62babeb8c5f28b22a1 /v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
parent87eb1f67e4981f3a09825012f16af0107a7adb45 (diff)
parentb5ff2cd5cc913156858a0b15a186144f146c89d7 (diff)
downloadmediapointer-dvb-s2-4d3f684d3b6ab28ec9e251fff156d0b0f53d0517.tar.gz
mediapointer-dvb-s2-4d3f684d3b6ab28ec9e251fff156d0b0f53d0517.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/sms1xxx
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l1/libv4l1.c')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/libv4l1.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
index b80fcb56d..80d2fa09b 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
+++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
@@ -28,12 +28,12 @@
capture only devices, or non v4l2 devices.
2) libv4l1 is the base of the v4l1compat.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 v4l1_open. Because we behave as the
- regular counterpart when the fd is not known (instead of say throwing
- an error), v4l1compat.so can simply call the v4l1_ prefixed function
- for all wrapped functions. This way the wrapper does not have to keep
- track of which fd's are being handled by libv4l1, as libv4l1 already
- keeps track of this itself.
+ and when opening /dev/videoX or /dev/v4l/ calls v4l1_open. Because we
+ behave as the regular counterpart when the fd is not known (instead of
+ say throwing an error), v4l1compat.so can simply call the v4l1_ prefixed
+ function for all wrapped functions. This way the wrapper does not have
+ to keep track of which fd's are being handled by libv4l1, as libv4l1
+ already keeps track of this itself.
This also means that libv4l1 may not use any of the regular functions
it mimics, as for example open could be a symbol in v4l1compat.so, which
@@ -279,7 +279,7 @@ int v4l1_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, no need to emulate v4l1 on