Commit 76c0e0f7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

When the current title fail, try the next one

Arccos FTW
Ref #6649
parent 85365c63
......@@ -475,12 +475,15 @@ static int Demux( demux_t *p_demux )
/* End of title */
if( p_sys->i_cur_cell >= p_sys->p_cur_pgc->nr_of_cells )
{
if( p_sys->i_title + 1 >= p_sys->i_titles )
int k = p_sys->i_title;
/* Looking for a not broken title */
while( k < p_sys->i_titles && DvdReadSetArea( p_demux, ++k, 0, -1 ) != VLC_SUCCESS )
{
return 0; /* EOF */
msg_Err(p_demux, "Failed next title, trying another: %i", k );
if( k >= p_sys->i_titles )
return 0; // EOF
}
DvdReadSetArea( p_demux, p_sys->i_title + 1, 0, -1 );
}
if( p_sys->i_pack_len >= 1024 )
......@@ -500,12 +503,15 @@ static int Demux( demux_t *p_demux )
if( p_sys->i_cur_cell >= p_sys->p_cur_pgc->nr_of_cells )
{
if( p_sys->i_title + 1 >= p_sys->i_titles )
int k = p_sys->i_title;
/* Looking for a not broken title */
while( k < p_sys->i_titles && DvdReadSetArea( p_demux, ++k, 0, -1 ) != VLC_SUCCESS )
{
return 0; /* EOF */
msg_Err(p_demux, "Failed next title, trying another: %i", k );
if( k >= p_sys->i_titles )
return 0; // EOF
}
DvdReadSetArea( p_demux, p_sys->i_title + 1, 0, -1 );
}
/*
......
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