summaryrefslogtreecommitdiffstats
path: root/options/parse_commandline.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-09-13 16:48:34 +0200
committerwm4 <wm4@nowhere>2019-09-13 17:31:59 +0200
commita9d83eac40c94f44d19fab7b6955331f10efe301 (patch)
tree151a76d57c17649b025e262f44fae5fb0eefd889 /options/parse_commandline.c
parentcf36e3d15b31958927b81b9ec99793c3a99bafc2 (diff)
downloadmpv-a9d83eac40c94f44d19fab7b6955331f10efe301.tar.bz2
mpv-a9d83eac40c94f44d19fab7b6955331f10efe301.tar.xz
Remove optical disc fancification layers
This removes anything related to DVD/BD/CD that negatively affected the core code. It includes trying to rewrite timestamps (since DVDs and Blurays do not set packet stream timestamps to playback time, and can even have resets mid-stream), export of chapters, stream languages, export of title/track lists, and all that. Only basic seeking is supported. It is very much possible that seeking completely fails on some discs (on some parts of the timeline), because timestamp rewriting was removed. Note that I don't give a shit about optical media. If you want to watch them, rip them. Keeping some bare support for DVD/BD is the most I'm going to do to appease the type of lazy, obnoxious users who will care. There are other players which are better at optical discs.
Diffstat (limited to 'options/parse_commandline.c')
-rw-r--r--options/parse_commandline.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/options/parse_commandline.c b/options/parse_commandline.c
index d2eb01966c..711f1f1df5 100644
--- a/options/parse_commandline.c
+++ b/options/parse_commandline.c
@@ -218,43 +218,8 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files,
} else {
// filename
void *tmp = talloc_new(NULL);
- bstr file = p.arg;
char *file0 = bstrdup0(tmp, p.arg);
-#if HAVE_GPL
- // expand DVD filename entries like dvd://1-3 into component titles
- if (bstr_startswith0(file, "dvd://")) {
- int offset = 6;
- char *splitpos = strstr(file0 + offset, "-");
- if (splitpos != NULL) {
- char *endpos;
- int start_title = strtol(file0 + offset, &endpos, 10);
- int end_title;
- //entries like dvd://-2 imply start at title 1
- if (start_title < 0) {
- end_title = abs(start_title);
- start_title = 1;
- } else
- end_title = strtol(splitpos + 1, &endpos, 10);
-
- #define dvd_range(a) (a >= 0 && a < 255)
- if (dvd_range(start_title) && dvd_range(end_title)
- && (start_title < end_title)) {
- for (int j = start_title; j <= end_title; j++) {
- char *f = talloc_asprintf(tmp, "dvd://%d%s", j,
- endpos);
- playlist_add_file(files, f);
- }
- } else
- MP_ERR(config, "Invalid play entry %s\n", file0);
-
- } else // dvd:// or dvd://x entry
- playlist_add_file(files, file0);
- } else {
- process_non_option(files, file0);
- }
-#else
process_non_option(files, file0);
-#endif
talloc_free(tmp);
}
}