dvdreadsrc: correctly determine last chapter's duration
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 18 Jun 2013 18:06:24 +0000 (20:06 +0200)
committerMark Nauwelaerts <mnauw@users.sourceforge.net>
Tue, 9 Jul 2013 20:04:51 +0000 (22:04 +0200)
This (mostly) reverts 683f5eeae7b830e4e4b790f3817ff6b8ce517b1c.
It worked just fine before ...

ext/dvdread/dvdreadsrc.c

index 4090d10..74ee856 100644 (file)
@@ -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;