summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2013-06-18 20:06:24 +0200
committerMark Nauwelaerts <mnauw@users.sourceforge.net>2013-07-09 22:04:51 +0200
commitd0502b0a52de2447cc0c1d2c457476c75f6e27ae (patch)
treeaa04a57da3bffbdf1e800ede5f6750d1050a4e6e /ext
parenta5fed6c2619ff196b620fd7c2669313eaf143c8f (diff)
dvdreadsrc: correctly determine last chapter's duration
This (mostly) reverts 683f5eeae7b830e4e4b790f3817ff6b8ce517b1c. It worked just fine before ...
Diffstat (limited to 'ext')
-rw-r--r--ext/dvdread/dvdreadsrc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/dvdread/dvdreadsrc.c b/ext/dvdread/dvdreadsrc.c
index 4090d100..74ee8560 100644
--- a/ext/dvdread/dvdreadsrc.c
+++ b/ext/dvdread/dvdreadsrc.c
@@ -328,8 +328,10 @@ cur_title_get_chapter_bounds (GstDvdReadSrc * src, gint chapter,
*p_first_cell = pgc->program_map[pgn - 1] - 1;
+ /* last cell is used as a 'up to boundary', not 'up to and including',
+ * i.e. it is the first cell not included in the chapter range */
if (chapter == (src->num_chapters - 1)) {
- *p_last_cell = pgc->nr_of_cells - 1;
+ *p_last_cell = pgc->nr_of_cells;
} else {
pgn_next_ch = src->vts_ptt_srpt->title[src->ttn - 1].ptt[chapter + 1].pgn;
*p_last_cell = pgc->program_map[pgn_next_ch - 1] - 1;