Commit f10b7234 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

ps.c: add a safety net to this while loop.

parent 76003f0e
......@@ -249,8 +249,9 @@ static void FindLength( demux_t *p_demux )
i_size = stream_Size( p_demux->s );
i_end = __MAX( 0, __MIN( 200000, i_size ) );
stream_Seek( p_demux->s, i_size - i_end );
i = 0;
while( vlc_object_alive (p_demux) && Demux2( p_demux, true ) > 0 );
while( vlc_object_alive (p_demux) && i < 40 && Demux2( p_demux, true ) > 0 );
if( i_current_pos >= 0 ) stream_Seek( p_demux->s, i_current_pos );
}
......
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