diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-01-21 01:43:19 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-01-21 01:43:19 +0000 |
commit | 4fc7f9d52eb06a1c16a6af76b3d20db2b06a0d8b (patch) | |
tree | 870cb1f594f7983977b3d2e3a79d2ec71a7cf9fc | |
parent | 935fedb922307d3f63f786f5f489eda248679831 (diff) | |
download | xine-lib-4fc7f9d52eb06a1c16a6af76b3d20db2b06a0d8b.tar.gz xine-lib-4fc7f9d52eb06a1c16a6af76b3d20db2b06a0d8b.tar.bz2 |
Require v4l2:/ prefix.
--HG--
branch : v4l
-rw-r--r-- | src/input/input_v4l2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input/input_v4l2.c b/src/input/input_v4l2.c index 1e6da1e78..295e991eb 100644 --- a/src/input/input_v4l2.c +++ b/src/input/input_v4l2.c @@ -333,9 +333,14 @@ typedef struct { static input_plugin_t *v4l2_class_get_instance(input_class_t *gen_cls, xine_stream_t *stream, const char *mrl) { v4l2_input_plugin_t *this; + if (strncasecmp (mrl, "v4l2:/", 6)) + return NULL; + mrl += 5; + while (*++mrl == '/') /**/; + --mrl; /* point at the last slash */ /* TODO: Radio devices */ /* FIXME: Don't require devices to be of /dev/videoXXX */ - if (strncmp(mrl, "/dev/video", strlen("/dev/video")) != 0) + if (strncmp(mrl, "/dev/video", 10) != 0) return NULL; lprintf("We can handle %s!\n", mrl); |