Commit f7bc314e authored by Gildas Bazin's avatar Gildas Bazin

* modules/access/dvdread.c: fixed bug that made some DVDs unplayable.

parent 5ca93b37
...@@ -491,7 +491,7 @@ static int Demux( demux_t *p_demux ) ...@@ -491,7 +491,7 @@ static int Demux( demux_t *p_demux )
DvdReadHandleDSI( p_demux, p_buffer ); DvdReadHandleDSI( p_demux, p_buffer );
/* End of title */ /* End of title */
if( p_sys->i_next_vobu > p_sys->i_title_end_block ) if( p_sys->i_cur_cell >= p_sys->p_cur_pgc->nr_of_cells )
{ {
if( p_sys->i_title + 1 >= p_sys->i_titles ) if( p_sys->i_title + 1 >= p_sys->i_titles )
{ {
...@@ -516,7 +516,7 @@ static int Demux( demux_t *p_demux ) ...@@ -516,7 +516,7 @@ static int Demux( demux_t *p_demux )
DemuxBlock( p_demux, p_buffer, DVD_VIDEO_LB_LEN ); DemuxBlock( p_demux, p_buffer, DVD_VIDEO_LB_LEN );
} }
if( p_sys->i_cur_block > p_sys->i_title_end_block ) if( p_sys->i_cur_cell >= p_sys->p_cur_pgc->nr_of_cells )
{ {
if( p_sys->i_title + 1 >= p_sys->i_titles ) if( p_sys->i_title + 1 >= p_sys->i_titles )
{ {
...@@ -1178,6 +1178,10 @@ static void DvdReadHandleDSI( demux_t *p_demux, uint8_t *p_data ) ...@@ -1178,6 +1178,10 @@ static void DvdReadHandleDSI( demux_t *p_demux, uint8_t *p_data )
else if( p_sys->dsi_pack.vobu_sri.next_vobu == SRI_END_OF_CELL ) else if( p_sys->dsi_pack.vobu_sri.next_vobu == SRI_END_OF_CELL )
{ {
p_sys->i_cur_cell = p_sys->i_next_cell; p_sys->i_cur_cell = p_sys->i_next_cell;
/* End of title */
if( p_sys->i_cur_cell >= p_sys->p_cur_pgc->nr_of_cells ) return;
DvdReadFindCell( p_demux ); DvdReadFindCell( p_demux );
p_sys->i_next_vobu = p_sys->i_next_vobu =
......
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