Mercurial > mplayer.hg
diff mencoder.c @ 26408:7a36d5941fd8
Replace the trivial command line preparser with a more robust version
allowing all kind of options to be used.
author | albeu |
---|---|
date | Sun, 13 Apr 2008 19:18:51 +0000 |
parents | aa0c534db455 |
children | cc7c52fa5eb1 |
line wrap: on
line diff
--- a/mencoder.c Sun Apr 13 11:15:08 2008 +0000 +++ b/mencoder.c Sun Apr 13 19:18:51 2008 +0000 @@ -408,9 +408,12 @@ 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,mencoder_opts); + + // Preparse the command line + m_config_preparse_command_line(mconfig,argc,argv); mp_msg(MSGT_CPLAYER,MSGL_INFO, "MEncoder " VERSION " (C) 2000-2008 MPlayer Team\n"); @@ -465,8 +468,6 @@ } } - mconfig = m_config_new(); - m_config_register_options(mconfig,mencoder_opts); parse_cfgfiles(mconfig); filelist = m_config_parse_me_command_line(mconfig, argc, argv); if(!filelist) mencoder_exit(1, MSGTR_ErrorParsingCommandLine);