diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-24 20:09:31 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-25 22:48:10 +0300 |
commit | a2133d76847dd4c7a19d6826cd9a6562bedfdbc4 (patch) | |
tree | 84d45683615f51b73c624f51ad62f46247ccedfc /cfg-common-opts.h | |
parent | 9c63c084ff589de88ddf26c64a074cdac0eca046 (diff) | |
download | mpv-a2133d76847dd4c7a19d6826cd9a6562bedfdbc4.tar.bz2 mpv-a2133d76847dd4c7a19d6826cd9a6562bedfdbc4.tar.xz |
options: move -chapter values to option struct
-chapter can optionally take a range with a start and an end. Add a
new option type which supports such values and use that instead of a
custom per-option function.
This commit also fixes a build configuration bug: before the
availability of the -chapter option depended on DVD functionality
being enabled in the binary, even though the option works with other
sources too.
Diffstat (limited to 'cfg-common-opts.h')
-rw-r--r-- | cfg-common-opts.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 7a32b2101a..1dea0485ed 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -52,12 +52,12 @@ {"dvd-speed", &dvd_speed, CONF_TYPE_INT, 0, 0, 0, NULL}, {"dvd", "-dvd N has been removed, use dvd://N instead.\n" , CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"dvdangle", &dvd_angle, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL}, - {"chapter", dvd_parse_chapter_range, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL}, #else {"dvd-device", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"dvd-speed", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"dvd", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif /* CONFIG_DVDREAD */ + OPT_INTPAIR("chapter", chapterrange, 0), OPT_INTRANGE("edition", edition_id, 0, -1, 8190), {"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL}, |