Commit 68bcb6a4 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

vlc: Make sure we call libvlc_release() when we are requested to die.

Note: I don't think we did yet match the old behaviour, if we hit ctrl-c while in libvlc_new(), vlc isn't killed properly.
parent 31013e29
......@@ -56,6 +56,9 @@ extern void __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenviron,
static void *SigHandler (void *set);
/* running vlc instance */
static libvlc_instance_t * vlc = NULL;
* main: parse command line, start interface and spawn threads.
......@@ -184,7 +187,7 @@ int main( int i_argc, const char *ppsz_argv[] )
libvlc_exception_init (&ex);
/* Initialize libvlc */
libvlc_instance_t *vlc = libvlc_new (i_argc, ppsz_argv, &ex);
vlc = libvlc_new (i_argc, ppsz_argv, &ex);
if (vlc != NULL)
libvlc_run_interface (vlc, NULL, &ex);
......@@ -252,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);
//VLC_Die( 0 );
if (vlc) libvlc_release( vlc );
else /* time (NULL) <= abort_time */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment