summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options/parse_commandline.c4
-rw-r--r--player/main.c5
2 files changed, 2 insertions, 7 deletions
diff --git a/options/parse_commandline.c b/options/parse_commandline.c
index 8db144241e..17b3f9254a 100644
--- a/options/parse_commandline.c
+++ b/options/parse_commandline.c
@@ -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.
diff --git a/player/main.c b/player/main.c
index de88d0b817..d8edf2e304 100644
--- a/player/main.c
+++ b/player/main.c
@@ -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;