summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-04-08 02:37:27 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-04-08 02:42:19 +0300
commit96daf7ed5ef96b86f2539164c27155bc830aa2a6 (patch)
treea77220fb48fba74773fe39cc7e5f4b3be381a4b5
parent2d91b19956c7d444ba440078e1c2ecd23d207a87 (diff)
downloadmpv-96daf7ed5ef96b86f2539164c27155bc830aa2a6.tar.bz2
mpv-96daf7ed5ef96b86f2539164c27155bc830aa2a6.tar.xz
Add option -noordered-chapters.
-rw-r--r--DOCS/man/en/mplayer.15
-rw-r--r--cfg-mplayer.h3
-rw-r--r--defaultopts.c1
-rw-r--r--mplayer.c6
-rw-r--r--options.h1
5 files changed, 16 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 39ca6543d6..355055c721 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -1071,6 +1071,11 @@ Turns off LIRC support.
.B \-nomouseinput
Disable mouse button press/\:release input (mozplayerxp's context menu relies
on this option).
+.TP
+.B \-noorderedchapters
+Disable support for Matroska ordered chapters.
+MPlayer will not load or search for video segments from other files,
+and will also ignore any chapter order specified for the main file.
.
.TP
.B \-rtc (RTC only)
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 5b5a1ac176..7b2335d776 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -311,6 +311,9 @@ const m_option_t mplayer_opts[]={
OPT_INTRANGE("loop", loop_times, 0, -1, 10000),
{"playlist", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL},
+ OPT_FLAG_ON("ordered-chapters", ordered_chapters, 0),
+ OPT_FLAG_OFF("noordered-chapters", ordered_chapters, 0),
+
// a-v sync stuff:
OPT_FLAG_ON("correct-pts", user_correct_pts, 0),
OPT_FLAG_OFF("nocorrect-pts", user_correct_pts, 0),
diff --git a/defaultopts.c b/defaultopts.c
index b35601e917..dfd163e865 100644
--- a/defaultopts.c
+++ b/defaultopts.c
@@ -20,6 +20,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
.osd_level = 1,
.osd_duration = 1000,
.loop_times = -1,
+ .ordered_chapters = 1,
.user_correct_pts = -1,
.key_fifo_size = 7,
.doubleclick_time = 300,
diff --git a/mplayer.c b/mplayer.c
index bd5957cee0..8bcaa3430b 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2730,6 +2730,12 @@ static int find_ordered_chapter_sources(struct MPContext *mpctx,
static void build_ordered_chapter_timeline(struct MPContext *mpctx)
{
+ if (!mpctx->opts.ordered_chapters) {
+ mp_msg(MSGT_CPLAYER, MSGL_INFO, "File uses ordered chapters, but "
+ "you have disabled support for them. Ignoring.\n");
+ return;
+ }
+
mp_msg(MSGT_CPLAYER, MSGL_INFO, "File uses ordered chapters, will build "
"edit timeline.\n");
diff --git a/options.h b/options.h
index 33dcccd883..a7411f83bc 100644
--- a/options.h
+++ b/options.h
@@ -28,6 +28,7 @@ typedef struct MPOpts {
int osd_level;
int osd_duration;
int loop_times;
+ int ordered_chapters;
int correct_pts;
int user_correct_pts;
int key_fifo_size;