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

avformat: do away with strang stream_Tell >= stream_Size check.

parent b7594a14
...@@ -514,19 +514,16 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence ) ...@@ -514,19 +514,16 @@ 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 )
if( i_size && i_absolute >= i_size )
{ {
if( i_absolute > i_size ) msg_Dbg( p_demux, "Trying to seek too far : EOF?" );
i_absolute = i_size; return -1;
if( stream_Tell( p_demux->s ) >= i_size )
{
msg_Err( p_demux, "Seeking too far : EOF?" );
return -1;
}
} }
if( stream_Seek( p_demux->s, i_absolute ) ) if( stream_Seek( p_demux->s, i_absolute ) )
{ {
msg_Warn( p_demux, "we were not allowed to seek, or EOF " );
return -1; return -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