summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvd.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-19 10:45:17 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-19 10:45:17 +0000
commit539b7600616595a6a561a2cdf052ea006625aae7 (patch)
tree1f7a50533dbe1b257094a0ec8d448102e2478267 /stream/stream_dvd.c
parent79d5a3b3b10acad993eb7937780b11669d69bf14 (diff)
downloadmpv-539b7600616595a6a561a2cdf052ea006625aae7.tar.bz2
mpv-539b7600616595a6a561a2cdf052ea006625aae7.tar.xz
sanity check: since chapter is 0-based it can't exceed nr_of_ptts-1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19448 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r--stream/stream_dvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index de80f30971..b222a6723a 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -489,7 +489,7 @@ static int seek_to_chapter(stream_t *stream, ifo_handle_t *vts_file, tt_srpt_t *
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];