[vlc-commits] oldrc: avoid vlc_object_kill()

Rémi Denis-Courmont git at videolan.org
Wed May 9 18:53:07 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May  9 18:00:06 2012 +0300| [3d11b0e1b4d785590b19f04bbc42cc85f16e63de] | committer: Rémi Denis-Courmont

oldrc: avoid vlc_object_kill()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d11b0e1b4d785590b19f04bbc42cc85f16e63de
---

 modules/control/rc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 3c33512..faf182d 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -455,24 +455,24 @@ static void Run( intf_thread_t *p_intf )
 
     p_buffer[0] = 0;
 
-    /* Register commands that will be cleaned up upon object destruction */
-    p_intf->p_sys->p_playlist = p_playlist;
-    RegisterCallbacks( p_intf );
-
-    /* status callbacks */
-    /* Listen to audio volume updates */
-    var_AddCallback( p_playlist, "volume", VolumeChanged, p_intf );
-
 #ifdef WIN32
     /* Get the file descriptor of the console input */
     p_intf->p_sys->hConsoleIn = GetStdHandle(STD_INPUT_HANDLE);
     if( p_intf->p_sys->hConsoleIn == INVALID_HANDLE_VALUE )
     {
         msg_Err( p_intf, "couldn't find user input handle" );
-        vlc_object_kill( p_intf );
+        return;
     }
 #endif
 
+    /* Register commands that will be cleaned up upon object destruction */
+    p_intf->p_sys->p_playlist = p_playlist;
+    RegisterCallbacks( p_intf );
+
+    /* status callbacks */
+    /* Listen to audio volume updates */
+    var_AddCallback( p_playlist, "volume", VolumeChanged, p_intf );
+
     while( vlc_object_alive( p_intf ) )
     {
         char *psz_cmd, *psz_arg;



More information about the vlc-commits mailing list