diff options
author | wm4 <wm4@nowhere> | 2014-06-07 23:41:47 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-08 00:03:45 +0200 |
commit | 924d4db0de4969b6713b96be73cc947bbff05ad1 (patch) | |
tree | 7ef9ad4ad9a49c88d2e672c7a2514fd1447787c5 /options/options.c | |
parent | 5cc68c792be1d0ae42017f6960ba1d0448646ff5 (diff) | |
download | mpv-924d4db0de4969b6713b96be73cc947bbff05ad1.tar.bz2 mpv-924d4db0de4969b6713b96be73cc947bbff05ad1.tar.xz |
options: change --sub-file behavior
--sub-file is actually a string list, so you can add multipel external
subtitle files. But to be able to set a list, the option value was split
on ",". This made it impossible to add filenames.
One possible solution would be adding escaping. That's probably a good
idea (and some other options already do this), but it's also complicated
both to implement and for the user.
The simpler solution is making --sub-file appending, and make it take
only a single entry.
I'm not quite sure about this yet. It breaks the invariant that if a
value is printed and parsed, you get the same value back. So for now,
just go with the simple solution.
Fixes #840.
Diffstat (limited to 'options/options.c')
-rw-r--r-- | options/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c index 3cebd0c5fd..8f071345d5 100644 --- a/options/options.c +++ b/options/options.c @@ -396,7 +396,7 @@ const m_option_t mp_opts[] = { // ------------------------- subtitles options -------------------- - OPT_STRINGLIST("sub-file", sub_name, 0), + OPT_STRING_APPEND_LIST("sub-file", sub_name, 0), OPT_PATHLIST("sub-paths", sub_paths, 0), OPT_STRING("sub-codepage", sub_cp, 0), OPT_FLOAT("sub-delay", sub_delay, 0), |