From ae0a40259fa9ce45d34c966da067e20a69156330 Mon Sep 17 00:00:00 2001 From: Dan Oscarsson Date: Mon, 27 Mar 2017 11:34:02 +0200 Subject: player: add --keep-open-pause=no option Instead of pausing if --keep-open is active, stop at end but continue playing if seeking backwards. And then stop again when end is reached. Signed-off-by: wm4 Over the PR, the option was renamed, and the manpage additions were slightly changed/enhanced. --- options/options.c | 2 ++ options/options.h | 1 + 2 files changed, 3 insertions(+) (limited to 'options') diff --git a/options/options.c b/options/options.c index c595964121..fd02fc26df 100644 --- a/options/options.c +++ b/options/options.c @@ -354,6 +354,7 @@ const m_option_t mp_opts[] = { ({"no", 0}, {"yes", 1}, {"always", 2})), + OPT_FLAG("keep-open-pause", keep_open_pause, 0), OPT_DOUBLE("image-display-duration", image_display_duration, M_OPT_RANGE, 0, INFINITY), @@ -911,6 +912,7 @@ const struct MPOpts mp_default_opts = { .play_frames = -1, .rebase_start_time = 1, .keep_open = 0, + .keep_open_pause = 1, .image_display_duration = 1.0, .stream_id = { { [STREAM_AUDIO] = -1, [STREAM_VIDEO] = -1, diff --git a/options/options.h b/options/options.h index b576dfc369..82f0c15aec 100644 --- a/options/options.h +++ b/options/options.h @@ -200,6 +200,7 @@ typedef struct MPOpts { char *watch_later_directory; int pause; int keep_open; + int keep_open_pause; double image_display_duration; char *lavfi_complex; int stream_id[2][STREAM_TYPE_COUNT]; -- cgit v1.2.3