# HG changeset patch # User reimar # Date 1393182548 0 # Node ID e6823a005ab6c25cf6ff19795a2a56990d515e7c # Parent 92dd1764392a7d4b13a5d792d3165a15956d49b0 Add some extra checks to avoid potential crashes. Should avoid the issues described in #2127. diff -r 92dd1764392a -r e6823a005ab6 stream/stream_dvd.c --- a/stream/stream_dvd.c Sun Feb 23 18:14:44 2014 +0000 +++ b/stream/stream_dvd.c Sun Feb 23 19:09:08 2014 +0000 @@ -509,6 +509,8 @@ unsigned int t=0; ptt_info_t *ptt; pgc_t *pgc; + if (!mp_msg_test(MSGT_IDENTIFY, MSGL_INFO)) + return; title_no = tt_srpt->title[title_no].vts_ttn - 1; if(vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts < 2) @@ -519,6 +521,8 @@ for(i=0; ivts_ptt_srpt->title[title_no].nr_of_ptts; i++) { pgc = vts_file->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc; + if (!pgc) + continue; cell = pgc->program_map[ptt[i].pgn-1]; //here the cell is 1-based if(ptt[i].pgnnr_of_programs) last_cell = pgc->program_map[ptt[i].pgn];