summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-26 20:27:45 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-26 20:27:45 +0000
commit39e4226e59d987d2f39fa7fc4fd567810f322282 (patch)
tree34ae3ae839f5df1d9518dafc992ad4faf6072a87
parent7755598a5a303bbe4402e2dfc3a83611e3f81578 (diff)
downloadmpv-39e4226e59d987d2f39fa7fc4fd567810f322282.tar.bz2
mpv-39e4226e59d987d2f39fa7fc4fd567810f322282.tar.xz
fixed off-by-one bug during chapter-listing; fixed by Jared Breland (list-mplayer@legroom.net) and me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23386 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/stream_dvd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index fdb960e6eb..16b66097fa 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -614,12 +614,12 @@ static void list_chapters(pgc_t *pgc)
return;
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "CHAPTERS: ");
- for(i=0; i<pgc->nr_of_programs-1; i++)
+ for(i=0; i<pgc->nr_of_programs; i++)
{
cell = pgc->program_map[i]; //here the cell is 1-based
t2 = t/1000;
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "%02d:%02d:%02d,", t2/3600, (t2/60)%60, t2%60);
- while(cell < pgc->program_map[i+1]) {
+ while(i+1<pgc->nr_of_programs && cell < pgc->program_map[i+1]) {
if(!(pgc->cell_playback[cell-1].block_type == BLOCK_TYPE_ANGLE_BLOCK &&
pgc->cell_playback[cell-1].block_mode != BLOCK_MODE_FIRST_CELL)
)