mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
dvdreadsrc: fix off by one in cell calculation for the last chapter
This commit is contained in:
parent
69541031da
commit
683f5eeae7
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue