player: remove confusing argc/argv adjustment

It's better if argc/argv always mean the same thing.
This commit is contained in:
wm4 2014-03-23 21:46:29 +01:00
parent ba62e01cd3
commit bb1b0a9f42
2 changed files with 2 additions and 7 deletions

View File

@ -128,7 +128,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files,
mode = GLOBAL;
struct parse_state p = {config, argc, argv};
struct parse_state p = {config, argc - 1, argv + 1};
while (split_opt(&p)) {
if (p.is_opt) {
int flags = M_SETOPT_FROM_CMDLINE;
@ -274,7 +274,7 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa
// Hack to shut up parser error messages
mp_msg_mute(global, true);
struct parse_state p = {config, argc, argv};
struct parse_state p = {config, argc - 1, argv + 1};
while (split_opt_silent(&p) == 0) {
if (p.is_opt) {
// Ignore non-pre-parse options. They will be set later.

View File

@ -460,11 +460,6 @@ int mpv_main(int argc, char *argv[])
{
osdep_preinit(&argc, &argv);
if (argc >= 1) {
argc--;
argv++;
}
struct MPContext *mpctx = mp_create();
struct MPOpts *opts = mpctx->opts;