mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
2a71763c88
commit
50e39ebb0a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue