diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2013-06-18 20:06:24 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mnauw@users.sourceforge.net> | 2013-07-09 22:03:27 +0200 |
commit | 59645fcb30d22e9fcdcaf0f618bced7f940f2f0d (patch) | |
tree | eadaaffae2be40f3c33bfbbb76450ffcae111f29 | |
parent | 9c2f52debddfaf8dd405887cfdf6493f6fbf2eba (diff) |
dvdreadsrc: correctly determine last chapter's duration
This (mostly) reverts 683f5eeae7b830e4e4b790f3817ff6b8ce517b1c.
It worked just fine before ...
-rw-r--r-- | ext/dvdread/dvdreadsrc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/dvdread/dvdreadsrc.c b/ext/dvdread/dvdreadsrc.c index c53887e2..5999b346 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; |