diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-04-13 19:18:51 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-04-13 19:18:51 +0000 |
commit | e4dc453ea095c1c3e282d5b6cc1370c74abb76cf (patch) | |
tree | 8a849caffbabb6308b2fb54e3581fa5797391513 /mplayer.c | |
parent | d08bf2fc44100bc4ee8400de1b8704519225533c (diff) | |
download | mpv-e4dc453ea095c1c3e282d5b6cc1370c74abb76cf.tar.bz2 mpv-e4dc453ea095c1c3e282d5b6cc1370c74abb76cf.tar.xz |
Replace the trivial command line preparser with a more robust version
allowing all kind of options to be used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26440 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -2554,9 +2554,13 @@ int gui_no_filename=0; mp_msg_init(); - for(i=1; i<argc; i++) - if(!strcmp(argv[i], "-really-quiet")) - verbose= -10; + // Create the config context and register the options + mconfig = m_config_new(); + m_config_register_options(mconfig,mplayer_opts); + mp_input_register_options(mconfig); + + // Preparse the command line + m_config_preparse_command_line(mconfig,argc,argv); print_version(); #if defined(WIN32) && defined(USE_WIN32DLL) @@ -2582,10 +2586,6 @@ int gui_no_filename=0; use_gui=1; } - mconfig = m_config_new(); - m_config_register_options(mconfig,mplayer_opts); - // TODO : add something to let modules register their options - mp_input_register_options(mconfig); parse_cfgfiles(mconfig); #ifdef HAVE_NEW_GUI |