summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-22 22:08:17 +0200
committerwm4 <wm4@nowhere>2015-08-22 22:08:17 +0200
commit602105dbdae5b35dfcd7c060349b42a990bd25a8 (patch)
tree8d07ab84dfa12396841010b3f7d066688f9352d2 /options
parent1e4113040c533278f61f66e56e817aba5958f380 (diff)
downloadmpv-602105dbdae5b35dfcd7c060349b42a990bd25a8.tar.bz2
mpv-602105dbdae5b35dfcd7c060349b42a990bd25a8.tar.xz
player: add --playlist-pos option
Oddly often requested.
Diffstat (limited to 'options')
-rw-r--r--options/options.c3
-rw-r--r--options/options.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index c393536af0..2a62ef69c8 100644
--- a/options/options.c
+++ b/options/options.c
@@ -200,6 +200,8 @@ const m_option_t mp_opts[] = {
OPT_TIME("ab-loop-a", ab_loop[0], 0, .min = MP_NOPTS_VALUE),
OPT_TIME("ab-loop-b", ab_loop[1], 0, .min = MP_NOPTS_VALUE),
+ OPT_CHOICE_OR_INT("playlist-pos", playlist_pos, 0, 0, INT_MAX, ({"no", -1})),
+
OPT_FLAG("pause", pause, M_OPT_FIXED),
OPT_CHOICE("keep-open", keep_open, 0,
({"no", 0},
@@ -754,6 +756,7 @@ const struct MPOpts mp_default_opts = {
.term_osd = 2,
.term_osd_bar_chars = "[-+-]",
.consolecontrols = 1,
+ .playlist_pos = -1,
.play_frames = -1,
.keep_open = 0,
.stream_id = { { [STREAM_AUDIO] = -1,
diff --git a/options/options.h b/options/options.h
index 1b65b4af4d..b3d6bb18c2 100644
--- a/options/options.h
+++ b/options/options.h
@@ -167,6 +167,7 @@ typedef struct MPOpts {
float heartbeat_interval;
int player_idle_mode;
int consolecontrols;
+ int playlist_pos;
struct m_rel_time play_start;
struct m_rel_time play_end;
struct m_rel_time play_length;