]> git.sesse.net Git - vlc/blobdiff - src/misc/win32_specific.c
* ./include/vlc_threads.h, ./src/misc/threads.c: improved the cond_wait
[vlc] / src / misc / win32_specific.c
index 32376b06a0cfcd2e9baeaf66a610d074b1a6d476..a1048f844266592f7f24ecddd3ef69f037d15a57 100644 (file)
@@ -2,7 +2,7 @@
  * win32_specific.c: Win32 specific features 
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: win32_specific.c,v 1.8 2002/06/01 12:32:02 sam Exp $
+ * $Id: win32_specific.c,v 1.12 2002/06/08 14:08:46 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Gildas Bazin <gbazin@netcourrier.com>
 /*****************************************************************************
  * system_Init: initialize winsock and misc other things.
  *****************************************************************************/
-void system_Init( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
 {
     WSADATA Data;
     int i_err;
     HINSTANCE hInstLib;
 
-    /* Allocate structure */
-    p_this->p_vlc->p_sys = malloc( sizeof( main_sys_t ) );
-    if( p_this->p_vlc->p_sys == NULL )
-    {
-        fprintf( stderr, "error: out of memory\n" );
-        exit(-1);
-    }
-
     /* dynamically get the address of SignalObjectAndWait */
     hInstLib = LoadLibrary( "kernel32" );
-    p_this->p_vlc->p_sys->SignalObjectAndWait =
+    p_this->p_vlc->SignalObjectAndWait =
         (SIGNALOBJECTANDWAIT)GetProcAddress( hInstLib, "SignalObjectAndWait" );
 
     /* WinSock Library Init. */
@@ -66,16 +58,15 @@ void system_Init( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[] )
 /*****************************************************************************
  * system_Configure: check for system specific configuration options.
  *****************************************************************************/
-void system_Configure( vlc_object_t *p_this )
+void system_Configure( vlc_t *p_this )
 {
-    p_this->p_vlc->p_sys->b_fast_pthread = config_GetInt( p_this,
-                                                         "fast_pthread" );
+    p_this->p_vlc->b_fast_pthread = config_GetInt( p_this, "fast-pthread" );
 }
 
 /*****************************************************************************
  * system_End: terminate winsock.
  *****************************************************************************/
-void system_End( vlc_object_t * )
+void system_End( vlc_t *p_this )
 {
     WSACleanup();
 }