dvdreadsrc: fix off by one in cell calculation for the last chapter
This commit is contained in:
parent
69541031da
commit
683f5eeae7
@ -325,11 +325,14 @@ cur_title_get_chapter_bounds (GstDvdReadSrc * src, gint chapter,
|
|||||||
*p_first_cell = pgc->program_map[pgn - 1] - 1;
|
*p_first_cell = pgc->program_map[pgn - 1] - 1;
|
||||||
|
|
||||||
if (chapter == (src->num_chapters - 1)) {
|
if (chapter == (src->num_chapters - 1)) {
|
||||||
*p_last_cell = pgc->nr_of_cells;
|
*p_last_cell = pgc->nr_of_cells - 1;
|
||||||
} else {
|
} else {
|
||||||
pgn_next_ch = src->vts_ptt_srpt->title[src->ttn - 1].ptt[chapter + 1].pgn;
|
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;
|
*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
|
static gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user