summaryrefslogtreecommitdiffstats
path: root/mpvcore/options.c
diff options
context:
space:
mode:
authorPhilip Sequeira <phsequei@gmail.com>2013-08-13 21:25:50 -0400
committerwm4 <wm4@nowhere>2013-08-17 21:32:52 +0200
commitb018c7d936879dc2ea1bd49b78157a70f9353430 (patch)
tree53221ab06169baa10c007cb46f1c7ee64cb90f5e /mpvcore/options.c
parent8cebec62621cb6e9ed03aab65f5b011393ac588d (diff)
downloadmpv-b018c7d936879dc2ea1bd49b78157a70f9353430.tar.bz2
mpv-b018c7d936879dc2ea1bd49b78157a70f9353430.tar.xz
command: more intuitive chapter seek behavior
If close to chapter start, skipping back goes to previous chapter (no change). If more than <threshold> seconds in, skipping back will now go to the beginning of the current chapter instead. The threshold is set by the new option --chapter-seek-threshold and defaults to 5 seconds. A negative value disables the new functionality.
Diffstat (limited to 'mpvcore/options.c')
-rw-r--r--mpvcore/options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mpvcore/options.c b/mpvcore/options.c
index e0d138a545..4a3c067404 100644
--- a/mpvcore/options.c
+++ b/mpvcore/options.c
@@ -661,6 +661,8 @@ const m_option_t mp_opts[] = {
OPT_FLAG("ordered-chapters", ordered_chapters, 0),
OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000),
+ OPT_DOUBLE("chapter-seek-threshold", chapter_seek_threshold, 0),
+
// a-v sync stuff:
OPT_FLAG("correct-pts", correct_pts, 0),
OPT_CHOICE("pts-association-mode", user_pts_assoc_mode, 0,
@@ -772,6 +774,7 @@ const struct MPOpts mp_default_opts = {
.loop_times = -1,
.ordered_chapters = 1,
.chapter_merge_threshold = 100,
+ .chapter_seek_threshold = 5.0,
.load_config = 1,
.position_resume = 1,
.stream_cache_min_percent = 20.0,