[vlc-devel] commit: Fix infinite loop ( Rafaël Carré )
git version control
git at videolan.org
Mon Mar 31 15:24:35 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Mar 29 06:31:02 2008 +0100| [e91f2120737a55ea877a5090c03628d370b52090]
Fix infinite loop
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e91f2120737a55ea877a5090c03628d370b52090
---
modules/codec/ffmpeg/demux.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/codec/ffmpeg/demux.c b/modules/codec/ffmpeg/demux.c
index de5f66a..7ea987a 100644
--- a/modules/codec/ffmpeg/demux.c
+++ b/modules/codec/ffmpeg/demux.c
@@ -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 ) )
{
More information about the vlc-devel
mailing list