Commit 96ac23c3 authored by Rafaël Carré's avatar Rafaël Carré

Fix infinite loop

(cherry picked from commit e91f2120)
parent aa179ba8
...@@ -489,8 +489,13 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence ) ...@@ -489,8 +489,13 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
} }
if( i_absolute < 0 ) if( i_absolute < 0 )
i_absolute = 0; i_absolute = 0;
if( i_size && i_absolute > i_size ) if( i_size )
i_absolute = 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 ) ) 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