--- mplayer_base/mplayer.c	2008-04-11 15:36:39.000000000 +0400
+++ mplayer/mplayer.c	2008-04-12 17:30:00.000000000 +0400
@@ -131,19 +131,6 @@
 //**************************************************************************//
 #include "parser-cfg.h"
 #include "parser-mpcmd.h"
-
-m_config_t* mconfig;
-
-//**************************************************************************//
-//             Config file
-//**************************************************************************//
-
-static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;}
-
-static int cfg_include(m_option_t *conf, char *filename){
-	return m_config_parse_config_file(mconfig, filename);
-}
-
 #include "get_path.h"
 
 //**************************************************************************//
@@ -2554,9 +2543,7 @@
   
   mp_msg_init();
 
-  for(i=1; i<argc; i++)
-    if(!strcmp(argv[i], "-really-quiet"))
-      verbose= -10;
+  preparse_command_line(argc, argv);
 
   print_version();
 #if defined(WIN32) && defined(USE_WIN32DLL)
--- mplayer_base/mencoder.c	2008-04-11 15:36:39.000000000 +0400
+++ mplayer/mencoder.c	2008-04-12 17:50:50.000000000 +0400
@@ -239,16 +239,6 @@
 
 //static int vo_w=0, vo_h=0;
 
-//-------------------------- config stuff:
-
-m_config_t* mconfig;
-
-static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;}
-
-static int cfg_include(m_option_t *conf, char *filename){
-	return m_config_parse_config_file(mconfig, filename);
-}
-
 static double seek_to_sec;
 static off_t seek_to_byte=0;
 
@@ -408,9 +404,7 @@
 
   mp_msg_init();
 
-  for(i=1; i<argc; i++)
-    if(!strcmp(argv[i], "-really-quiet"))
-      verbose= -10;
+  preparse_command_line(argc, argv);
 
   mp_msg(MSGT_CPLAYER,MSGL_INFO, "MEncoder " VERSION " (C) 2000-2008 MPlayer Team\n");
 
--- mplayer_base/mpcommon.h	2008-03-08 02:46:16.000000000 +0300
+++ mplayer/mpcommon.h	2008-04-12 19:01:58.000000000 +0400
@@ -4,6 +4,8 @@
 #include "subreader.h"
 #include "libmpdemux/demuxer.h"
 #include "libmpdemux/stheader.h"
+#include "m_config.h"
+#include "m_option.h"
 
 extern double sub_last_pts;
 extern struct ass_track_s *ass_track;
@@ -12,4 +14,15 @@
 void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset);
 int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang);
 
+/* configuration management */
+extern m_config_t* mconfig;
+
+static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;}
+
+static int cfg_include(m_option_t *conf, char *filename){
+	return m_config_parse_config_file(mconfig, filename);
+}
+
+void preparse_command_line(int argc, char* argv[]);
+
 #endif /* MPLAYER_MPCOMMON_H */
--- mplayer_base/mpcommon.c	2008-04-03 12:37:38.000000000 +0400
+++ mplayer/mpcommon.c	2008-04-12 19:01:43.000000000 +0400
@@ -205,3 +205,19 @@
     }
     return demuxer->audio->id;
 }
+
+//**************************************************************************//
+//             Config management
+//**************************************************************************//
+
+#include "m_config.h"
+m_config_t* mconfig;
+
+void preparse_command_line(int argc, char* argv[])
+{
+    int i;
+  
+    for(i=1; i<argc; i++)
+        if(!strcmp(argv[i], "-really-quiet"))
+            verbose= -10; 
+}
