]> git.sesse.net Git - vlc/commitdiff
Partially revert 497a6b5b as it creates infinite loops with avformat.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 14 Jan 2009 22:30:50 +0000 (23:30 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 14 Jan 2009 22:42:29 +0000 (23:42 +0100)
I am not sure that the reverted part was really intented.
Reported by Jonathan Brossard, iViZ Techno Solutions Pvt. Ltd.

modules/demux/avformat/demux.c

index 1841ce5576ff37bd768d9953330000af81acb7bd..237c168d9c1f1ae2e6578c5e9d9ef31e8ef1fe1b 100644 (file)
@@ -676,8 +676,12 @@ static int64_t IOSeek( void *opaque, int64_t offset, int whence )
             return -1;
 
     }
+
     if( i_absolute < 0 )
-        i_absolute = 0;
+    {
+        msg_Dbg( p_demux, "Trying to seek before the beginning" );
+        return -1;
+    }
 
     if( i_size > 0 && i_absolute >= i_size )
     {