[vlc-devel] commit: Workaround for demuxers seeking with a negative position. ( Laurent Aimar )

git version control git at videolan.org
Sat Jan 23 21:27:44 CET 2010


vlc/vlc-1.0 | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Jan 23 21:25:38 2010 +0100| [80714c39b7edcc734932091577fe7cdc694b5815] | committer: Laurent Aimar 

Workaround for demuxers seeking with a negative position.

It happens on broken files with demuxers that do not check for overflows.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=80714c39b7edcc734932091577fe7cdc694b5815
---

 src/input/stream.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 4dfdf15..8947f23 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -1822,6 +1822,9 @@ static int ASeek( stream_t *s, int64_t i_pos )
     stream_sys_t *p_sys = s->p_sys;
     access_t *p_access = p_sys->p_access;
 
+    if( i_pos < 0 )
+        return VLC_EGENERIC;
+
     /* Check which stream we need to access */
     if( p_sys->i_list )
     {




More information about the vlc-devel mailing list