[vlc-commits] commit: Revert "Call libvlc_set_exit_handler() before the interfaces and playlist start" ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Mon Aug 2 18:33:42 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 2 19:33:36 2010 +0300| [351d62a8500f37b5bb3683bb18abd85774184354] | committer: Rémi Denis-Courmont
Revert "Call libvlc_set_exit_handler() before the interfaces and playlist start"
This reverts commit 4d636fa3a74924691b0bb1e26e600f7657e0af5c.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=351d62a8500f37b5bb3683bb18abd85774184354
---
bin/vlc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/vlc.c b/bin/vlc.c
index 7e775d3..25fcf51 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -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);
More information about the vlc-commits
mailing list