Fixed compilation of v4l2 + refuse to initialize unless it is forced.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 21 Feb 2007 23:02:56 +0000 (23:02 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 21 Feb 2007 23:02:56 +0000 (23:02 +0000)
modules/access/v4l2.c

index 1e289eb..4af83d4 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc_access.h>
+#include <vlc_demux.h>
 #include <vlc_input.h>
 #include <vlc_vout.h>
 
@@ -124,6 +125,10 @@ static int Open( vlc_object_t *p_this )
     demux_sys_t *p_sys;
     demux_sys_t sys;
 
+    /* Only when selected */
+    if( *p_demux->psz_access == '\0' )
+        return VLC_EGENERIC;
+
     /* Set up p_demux */
     p_demux->pf_control = Control;
     p_demux->info.i_update = 0;