comparison stream/stream_dvd.c @ 36813:c3809c28a4e0

Add additional sanity checks.
author reimar
date Sun, 23 Feb 2014 19:17:23 +0000
parents e6823a005ab6
children
comparison
equal deleted inserted replaced
36812:e6823a005ab6 36813:c3809c28a4e0
518 ptt = vts_file->vts_ptt_srpt->title[title_no].ptt; 518 ptt = vts_file->vts_ptt_srpt->title[title_no].ptt;
519 519
520 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "CHAPTERS: "); 520 mp_msg(MSGT_IDENTIFY, MSGL_INFO, "CHAPTERS: ");
521 for(i=0; i<vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts; i++) 521 for(i=0; i<vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts; i++)
522 { 522 {
523 int pgc_idx = ptt[i].pgcn-1;
524 if (pgc_idx < 0 || pgc_idx >= vts_file->vts_pgcit->nr_of_pgci_srp)
525 continue;
523 pgc = vts_file->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc; 526 pgc = vts_file->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc;
524 if (!pgc) 527 if (!pgc)
525 continue; 528 continue;
526 cell = pgc->program_map[ptt[i].pgn-1]; //here the cell is 1-based 529 cell = pgc->program_map[ptt[i].pgn-1]; //here the cell is 1-based
527 if(ptt[i].pgn<pgc->nr_of_programs) 530 if(ptt[i].pgn<pgc->nr_of_programs)