From 50e39ebb0aee100640c7dd48f0f0bc2d845babcc Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 16 Dec 2014 19:28:08 +0100 Subject: [PATCH] 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. --- stream/stream_dvdnav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);