]> git.sesse.net Git - vlc/blobdiff - src/vlc.c
Add mx4n and mx4p FourCC
[vlc] / src / vlc.c
index 922ef17c1cc74d7689e3ff537566fcc5a04f3241..c84e7f177db5ec783e0ed8de61d58a602fe5e9a8 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -56,9 +56,6 @@ extern void __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenviron,
 static void *SigHandler (void *set);
 #endif
 
-/* running vlc instance */
-static libvlc_instance_t * vlc = NULL;
-
 /*****************************************************************************
  * main: parse command line, start interface and spawn threads.
  *****************************************************************************/
@@ -187,7 +184,10 @@ int main( int i_argc, const char *ppsz_argv[] )
     libvlc_exception_init (&ex);
 
     /* Initialize libvlc */
-    vlc = libvlc_new (i_argc, ppsz_argv, &ex);
+    int i_argc_real = i_argc ? i_argc - 1 : 0;
+    const char **ppsz_argv_real = i_argc ? &ppsz_argv[1] : ppsz_argv;
+    libvlc_instance_t *vlc = libvlc_new (i_argc_real, ppsz_argv_real, &ex);
+
     if (vlc != NULL)
     {
         libvlc_run_interface (vlc, NULL, &ex);
@@ -255,7 +255,7 @@ static void *SigHandler (void *data)
 
             fprintf (stderr, "signal %d received, terminating vlc - do it "
                             "again quickly in case it gets stuck\n", i_signal);
-            if (vlc) libvlc_release (vlc);
+            //VLC_Die( 0 );
         }
         else /* time (NULL) <= abort_time */
         {