Mercurial > mplayer.hg
diff stream/stream_dvd.c @ 19442:ab91d0304070
sanity check: since chapter is 0-based it can't exceed nr_of_ptts-1
author | nicodvb |
---|---|
date | Sat, 19 Aug 2006 10:45:17 +0000 |
parents | 9847a1bd66a0 |
children | ebaf8067faae |
line wrap: on
line diff
--- a/stream/stream_dvd.c Fri Aug 18 19:08:10 2006 +0000 +++ b/stream/stream_dvd.c Sat Aug 19 10:45:17 2006 +0000 @@ -489,7 +489,7 @@ if(!vts_file || !tt_srpt) return 0; - if(chapter < 0 || chapter > vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts) //no such chapter + if(chapter < 0 || chapter > vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts-1) //no such chapter return 0; ptt = vts_file->vts_ptt_srpt->title[title_no].ptt[chapter];