[MPlayer-cvslog] r35713 - trunk/mpcommon.c

reimar subversion at mplayerhq.hu
Sun Jan 6 10:45:34 CET 2013


Author: reimar
Date: Sun Jan  6 10:45:34 2013
New Revision: 35713

Log:
Call sanitize_os already in preinit function instead of only during init.

Possibly fixes some cases where Windows would still show a "No Disk" error dialog instead
of failing the open() function.

Modified:
   trunk/mpcommon.c

Modified: trunk/mpcommon.c
==============================================================================
--- trunk/mpcommon.c	Mon Dec 31 05:35:03 2012	(r35712)
+++ trunk/mpcommon.c	Sun Jan  6 10:45:34 2013	(r35713)
@@ -457,18 +457,6 @@ const m_option_t noconfig_opts[] = {
 };
 
 /**
- * Initialization code to be run at the very start, must not depend
- * on option values.
- */
-void common_preinit(void)
-{
-    InitTimer();
-    srand(GetTimerMS());
-
-    mp_msg_init();
-}
-
-/**
  * Code to fix any kind of insane defaults some OS might have.
  * Currently mostly fixes for insecure-by-default Windows.
  */
@@ -492,6 +480,19 @@ static void sanitize_os(void)
 }
 
 /**
+ * Initialization code to be run at the very start, must not depend
+ * on option values.
+ */
+void common_preinit(void)
+{
+    sanitize_os();
+    InitTimer();
+    srand(GetTimerMS());
+
+    mp_msg_init();
+}
+
+/**
  * Initialization code to be run after command-line parsing.
  */
 int common_init(void)
@@ -499,7 +500,6 @@ int common_init(void)
 #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL)
     set_path_env();
 #endif
-    sanitize_os();
 
 #ifdef CONFIG_PRIORITY
     set_priority();


More information about the MPlayer-cvslog mailing list