Commit 497ce52c authored by Gildas Bazin's avatar Gildas Bazin

Another fix from Sam:

* fix random segfaults on title change.
  (cell.i_cell_nb should be tested _before_ we access the structures)
parent 5c7fbb3b
/* dvd_seek.c: functions to navigate through DVD. /* dvd_seek.c: functions to navigate through DVD.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_seek.c,v 1.5 2002/04/25 21:52:42 sam Exp $ * $Id: dvd_seek.c,v 1.6 2002/05/16 16:51:50 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -69,7 +69,7 @@ int CellIsInterleaved( thread_dvd_data_t * p_dvd ) ...@@ -69,7 +69,7 @@ int CellIsInterleaved( thread_dvd_data_t * p_dvd )
int CellPrg2Map( thread_dvd_data_t * p_dvd ) int CellPrg2Map( thread_dvd_data_t * p_dvd )
{ {
int i_cell; int i_cell;
i_cell = p_dvd->i_map_cell; i_cell = p_dvd->i_map_cell;
...@@ -78,11 +78,11 @@ int CellPrg2Map( thread_dvd_data_t * p_dvd ) ...@@ -78,11 +78,11 @@ int CellPrg2Map( thread_dvd_data_t * p_dvd )
return -1; return -1;
} }
while( ( ( title.p_cell_pos[p_dvd->i_prg_cell].i_vob_id != while( ( i_cell < cell.i_cell_nb ) &&
cell.p_cell_map[i_cell].i_vob_id ) || ( ( title.p_cell_pos[p_dvd->i_prg_cell].i_vob_id !=
( title.p_cell_pos[p_dvd->i_prg_cell].i_cell_id != cell.p_cell_map[i_cell].i_vob_id ) ||
cell.p_cell_map[i_cell].i_cell_id ) ) && ( title.p_cell_pos[p_dvd->i_prg_cell].i_cell_id !=
( i_cell < cell.i_cell_nb ) ) cell.p_cell_map[i_cell].i_cell_id ) ) )
{ {
i_cell++; i_cell++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment