diff options
author | wm4 <wm4@nowhere> | 2019-05-26 01:11:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | 900a9624f9156dd1160b2488536156f9e9e654bd (patch) | |
tree | 4ca36ee821f4913d00bf35c33b06da0549e124b8 /player/misc.c | |
parent | f68d9e75f8957957a9b97e2883a9482fd0b6479a (diff) | |
download | mpv-900a9624f9156dd1160b2488536156f9e9e654bd.tar.bz2 mpv-900a9624f9156dd1160b2488536156f9e9e654bd.tar.xz |
options: remove --chapter
Has been deprecated for almost 3 years. Manpage didn't mention the
deprecation, but CLI and release notes did. It wouldn't be much effort
to keep this option working, but I just don't see the damn point.
--start/--end can specify chapters using special syntax, which is
equivalent.
Diffstat (limited to 'player/misc.c')
-rw-r--r-- | player/misc.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/player/misc.c b/player/misc.c index ec8812f773..43d5a750e5 100644 --- a/player/misc.c +++ b/player/misc.c @@ -100,11 +100,6 @@ double get_play_end_pts(struct MPContext *mpctx) if (length != MP_NOPTS_VALUE && (end == MP_NOPTS_VALUE || start + length < end)) end = start + length; } - if (opts->chapterrange[1] > 0) { - double cend = chapter_start_time(mpctx, opts->chapterrange[1]); - if (cend != MP_NOPTS_VALUE && (end == MP_NOPTS_VALUE || cend < end)) - end = cend; - } // even though MP_NOPTS_VALUE is currently negative // it doesn't necessarily have to remain that way double ab_loop_start_time = get_ab_loop_start_time(mpctx); @@ -129,24 +124,7 @@ double get_play_end_pts(struct MPContext *mpctx) double get_play_start_pts(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; - double play_start_pts = rel_time_to_abs(mpctx, opts->play_start); - if (play_start_pts == MP_NOPTS_VALUE && opts->chapterrange[0] > 0) { - double chapter_start_pts = chapter_start_time(mpctx, opts->chapterrange[0] - 1); - if (chapter_start_pts != MP_NOPTS_VALUE) { - /* - * get_play_start_pts always returns rebased timetamps, - * even with --rebase-start-time=no. chapter_start_time - * values are not rebased without --rebase-start-time=yes, - * so we need to rebase them here to be consistent with - * the rest of get_play_start_pts. - */ - if (mpctx->demuxer && !mpctx->opts->rebase_start_time){ - chapter_start_pts -= mpctx->demuxer->start_time; - } - play_start_pts = chapter_start_pts; - } - } - return play_start_pts; + return rel_time_to_abs(mpctx, opts->play_start); } /** |