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 /mencoder.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 'mencoder.c')
-rw-r--r-- | mencoder.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mencoder.c b/mencoder.c index f4df17fdea..1274244a54 100644 --- a/mencoder.c +++ b/mencoder.c @@ -408,9 +408,12 @@ user_correct_pts = 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,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 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ } } - 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); |