summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-23 21:46:29 +0100
committerwm4 <wm4@nowhere>2014-03-23 21:46:29 +0100
commitbb1b0a9f42dabbaa196266fc11fddede74845877 (patch)
treea42bf57e3dda85bb154787e628b91a363ed9b92f /options
parentba62e01cd391be2c652897b7a4b0bde8176e390f (diff)
downloadmpv-bb1b0a9f42dabbaa196266fc11fddede74845877.tar.bz2
mpv-bb1b0a9f42dabbaa196266fc11fddede74845877.tar.xz
player: remove confusing argc/argv adjustment
It's better if argc/argv always mean the same thing.
Diffstat (limited to 'options')
-rw-r--r--options/parse_commandline.c4
1 files changed, 2 insertions, 2 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.