static void *SigHandler (void *set);
#endif
-/* running vlc instance */
-static libvlc_instance_t * vlc = NULL;
-
/*****************************************************************************
* main: parse command line, start interface and spawn threads.
*****************************************************************************/
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);
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 */
{