]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
Lua: escape the lua modules names (fix #3492)
[vlc] / src / libvlc.c
index 3217b9be1b88f3cee95120a425269d50118d8f4d..b5c87332e7b2a606563a28e28615942c1761b628 100644 (file)
@@ -321,7 +321,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
      * options) */
     module_InitBank( p_libvlc );
 
-    if( config_LoadCmdLine( p_libvlc, i_argc, ppsz_argv, true ) )
+    if( config_LoadCmdLine( p_libvlc, i_argc, ppsz_argv, NULL ) )
     {
         module_EndBank( p_libvlc, false );
         return VLC_EGENERIC;
@@ -534,10 +534,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /*
      * Override configuration with command line settings
      */
-    /* config_LoadCmdLine(), DBus (below) and Win32-specific use vlc_optind,
-     * vlc_optarg and vlc_optopt globals. This is not thread-safe!! */
-#warning BUG!
-    if( config_LoadCmdLine( p_libvlc, i_argc, ppsz_argv, false ) )
+    int vlc_optind;
+    if( config_LoadCmdLine( p_libvlc, i_argc, ppsz_argv, &vlc_optind ) )
     {
 #ifdef WIN32
         ShowConsole( false );
@@ -818,7 +816,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     }
 
     /* System specific configuration */
-    system_Configure( p_libvlc, i_argc, ppsz_argv );
+    system_Configure( p_libvlc, i_argc - vlc_optind, ppsz_argv + vlc_optind );
 
     /* Add service discovery modules */
     psz_modules = var_InheritString( p_libvlc, "services-discovery" );
@@ -966,7 +964,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
      * We assume that the remaining parameters are filenames
      * and their input options.
      */
-    msg_Info( p_libvlc, "optind = %u", vlc_optind );
     GetFilenames( p_libvlc, i_argc - vlc_optind, ppsz_argv + vlc_optind );
 
     /*