Revert "Call libvlc_set_exit_handler() before the interfaces and playlist start"

This reverts commit 4d636fa3a7.
This commit is contained in:
Rémi Denis-Courmont 2010-08-02 19:33:36 +03:00
parent dbb30dece5
commit 351d62a850
1 changed files with 4 additions and 2 deletions

View File

@ -203,8 +203,6 @@ int main( int i_argc, const char *ppsz_argv[] )
if (vlc == NULL)
goto out;
pthread_t self = pthread_self ();
libvlc_set_exit_handler (vlc, vlc_kill, &self);
libvlc_set_user_agent (vlc, "VLC media player", NULL);
#if !defined (HAVE_MAEMO) && !defined __APPLE__
@ -215,6 +213,10 @@ int main( int i_argc, const char *ppsz_argv[] )
libvlc_playlist_play (vlc, -1, 0, NULL);
/* Wait for a termination signal */
pthread_t self = pthread_self ();
libvlc_set_exit_handler (vlc, vlc_kill, &self);
if (signal_ignored (SIGHUP)) /* <- needed to handle nohup properly */
sigdelset (&set, SIGHUP);
sigdelset (&set, SIGPIPE);