diff options
author | wm4 <wm4@nowhere> | 2014-12-16 19:28:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-16 19:28:08 +0100 |
commit | 50e39ebb0aee100640c7dd48f0f0bc2d845babcc (patch) | |
tree | 639da4cca5374f1e40941ad39db2acaa0510d62a /stream/stream_dvdnav.c | |
parent | 2a71763c88c046faf63e5f7433e56a2fdab8c11c (diff) | |
download | mpv-50e39ebb0aee100640c7dd48f0f0bc2d845babcc.tar.bz2 mpv-50e39ebb0aee100640c7dd48f0f0bc2d845babcc.tar.xz |
dvd: add the last chapter
As suggested in issue #1251. I think the main point is that it acts as
a hack to return to the DVD menu when jumping past the last chapter,
because it will reach title-EOF, instead of explicitly jumping to the
next file (which usually exits the player).
This basically reverts commit 8b7418d, except it doesn't include an
off-by-1 error (apparently).
Closes #1251.
Diffstat (limited to 'stream/stream_dvdnav.c')
-rw-r--r-- | stream/stream_dvdnav.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index c1513e9e85..cfbf438cf0 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -501,7 +501,7 @@ static int control(stream_t *stream, int cmd, void *arg) int n = dvdnav_describe_title_chapters(dvdnav, tit, &parts, &duration); if (!parts) break; - if (chapter < 0 || chapter + 1 >= n) + if (chapter < 0 || chapter + 1 > n) break; *ch = chapter > 0 ? parts[chapter - 1] / 90000.0 : 0; free(parts); |