[vlc-devel] commit: avformat: do away with strang stream_Tell >= stream_Size check. ( Derk-Jan Hartman )
git version control
git at videolan.org
Wed Jul 30 03:31:08 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Wed Jul 30 03:32:35 2008 +0200| [b5c566d923f2dc68e03a6e8deacfc5607982f27a]
avformat: do away with strang stream_Tell >= stream_Size check.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b5c566d923f2dc68e03a6e8deacfc5607982f27a
---
modules/demux/avformat/demux.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 72ccd75..bd5fba7 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -514,19 +514,16 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
}
if( i_absolute < 0 )
i_absolute = 0;
- if( 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 )
- {
- msg_Err( p_demux, "Seeking too far : EOF?" );
- return -1;
- }
+ msg_Dbg( p_demux, "Trying to seek too far : EOF?" );
+ return -1;
}
if( stream_Seek( p_demux->s, i_absolute ) )
{
+ msg_Warn( p_demux, "we were not allowed to seek, or EOF " );
return -1;
}
More information about the vlc-devel
mailing list