Commit e91f2120 authored by Rafaël Carré's avatar Rafaël Carré

Fix infinite loop

parent 9143df1d
......@@ -492,8 +492,13 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
}
if( i_absolute < 0 )
i_absolute = 0;
if( i_size && i_absolute > i_size )
i_absolute = i_size;
if( i_size )
{
if( i_absolute > i_size )
i_absolute = i_size;
if( stream_Tell( p_demux->s ) >= i_size )
return -1;
}
if( stream_Seek( p_demux->s, i_absolute ) )
{
......
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