diff options
Diffstat (limited to 'src')
-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); |