From a2133d76847dd4c7a19d6826cd9a6562bedfdbc4 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 24 Apr 2010 20:09:31 +0300 Subject: 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. --- cfg-common-opts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cfg-common-opts.h') 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}, -- cgit v1.2.3