From d5225a4365eebe288c4ed569890f4ad8fc4e575c Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Sun, 22 Aug 2004 11:06:28 +0000 Subject: [PATCH] * modules/access/dvdread.c: fixed chapter change detection. --- modules/access/dvdread.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c index a72f32da67..297701164a 100644 --- a/modules/access/dvdread.c +++ b/modules/access/dvdread.c @@ -1194,13 +1194,15 @@ static void DvdReadFindCell( demux_t *p_demux ) #undef cell + if( p_sys->i_chapter + 1 >= p_sys->i_chapters ) return; + pgc_id = p_sys->p_vts_file->vts_ptt_srpt->title[ - p_sys->i_ttn - 1].ptt[p_sys->i_chapter].pgcn; + p_sys->i_ttn - 1].ptt[p_sys->i_chapter + 1].pgcn; pgn = p_sys->p_vts_file->vts_ptt_srpt->title[ - p_sys->i_ttn - 1].ptt[p_sys->i_chapter].pgn; + p_sys->i_ttn - 1].ptt[p_sys->i_chapter + 1].pgn; p_pgc = p_sys->p_vts_file->vts_pgcit->pgci_srp[pgc_id - 1].pgc; - if( p_pgc->program_map[pgn - 1] <= p_sys->i_cur_cell ) + if( p_sys->i_cur_cell >= p_pgc->program_map[pgn - 1] - 1 ) { p_sys->i_chapter++; -- 2.39.2