summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-13 02:05:37 +0200
committerwm4 <wm4@nowhere>2014-06-13 02:05:37 +0200
commit98a31d5937e8397d8fcd0fefe56630a1cd765cf0 (patch)
tree047059fc97815b1ddafd35f1e68717a09cfed61e /demux
parenta7a14be088b6af60a506db04e5ee864112bc5544 (diff)
downloadmpv-98a31d5937e8397d8fcd0fefe56630a1cd765cf0.tar.bz2
mpv-98a31d5937e8397d8fcd0fefe56630a1cd765cf0.tar.xz
options: turn --idx, --forceidx into --index
Also clarify the semantics. It seems --idx didn't do anything. Possibly it used to change how the now removed legacy demuxers like demux_avi used to behave. Or maybe it was accidental. --forceidx basically becomes --index=force. It's possible that new index modes will be added in the future, so I'm keeping it extensible, instead of e.g. creating --force-index.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c2
-rw-r--r--demux/demux_mkv.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 58b6c75483..19e6357563 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -641,7 +641,7 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
parse_cryptokey(avfc, lavfdopts->cryptokey);
if (lavfdopts->genptsmode)
avfc->flags |= AVFMT_FLAG_GENPTS;
- if (opts->index_mode == 0)
+ if (opts->index_mode != 1)
avfc->flags |= AVFMT_FLAG_IGNIDX;
#if LIBAVFORMAT_VERSION_MICRO >= 100
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 462a93aaa8..7b712e07ab 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -690,7 +690,7 @@ static int demux_mkv_read_cues(demuxer_t *demuxer)
mkv_d->deferred_cues = 0;
- if (opts->index_mode == 0 || opts->index_mode == 2) {
+ if (opts->index_mode != 1) {
ebml_read_skip(demuxer->log, -1, s);
return 0;
}