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:
wm4 2014-12-16 19:28:08 +01:00
parent 2a71763c88
commit 50e39ebb0a
1 changed files with 1 additions and 1 deletions

View File

@ -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);