summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2012-01-13 15:03:50 +0000
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2012-01-13 15:03:50 +0000
commit683f5eeae7b830e4e4b790f3817ff6b8ce517b1c (patch)
tree4c1e9b427a30378bcc7b25d2dab9b5f52370e224
parent69541031da9302b8fe6bfbb3e52a213400fa287b (diff)
dvdreadsrc: fix off by one in cell calculation for the last chapter
-rw-r--r--ext/dvdread/dvdreadsrc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/dvdread/dvdreadsrc.c b/ext/dvdread/dvdreadsrc.c
index 1ed59e54..9877f072 100644
--- a/ext/dvdread/dvdreadsrc.c
+++ b/ext/dvdread/dvdreadsrc.c
@@ -325,11 +325,14 @@ cur_title_get_chapter_bounds (GstDvdReadSrc * src, gint chapter,
*p_first_cell = pgc->program_map[pgn - 1] - 1;
if (chapter == (src->num_chapters - 1)) {
- *p_last_cell = pgc->nr_of_cells;
+ *p_last_cell = pgc->nr_of_cells - 1;
} 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;
}
+
+ GST_DEBUG_OBJECT (src, "Chapter %d bounds: %d %d (within %d cells)",
+ chapter, *p_first_cell, *p_last_cell, pgc->nr_of_cells);
}
static gboolean