]> git.sesse.net Git - vlc/commitdiff
* stream.c: call Seek if stream_Read( s, NULL, skip );
authorLaurent Aimar <fenrir@videolan.org>
Sun, 1 Aug 2004 09:19:06 +0000 (09:19 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 1 Aug 2004 09:19:06 +0000 (09:19 +0000)
src/input/stream.c

index f2c4ffe5f1ca8a520bf56bcc70ed0e6fba1b97aa..3ba07e1f72384a19206b7256b86dece2c60aac16 100644 (file)
@@ -479,6 +479,9 @@ static int AStreamReadBlock( stream_t *s, void *p_read, int i_read )
     if( p_sys->block.p_current == NULL )
         return 0;
 
+    if( p_read == NULL )
+        return AStreamSeekBlock( s, p_sys->i_pos + i_read ) ? 0 : i_read;
+
     while( i_data < i_read )
     {
         int i_current =
@@ -795,6 +798,9 @@ static int AStreamReadStream( stream_t *s, void *p_read, int i_read )
 
     if( tk->i_start >= tk->i_end ) return 0; /* EOF */
 
+    if( p_read == NULL )
+        return AStreamSeekStream( s, p_sys->i_pos + i_read ) ? 0 : i_read;
+
 #if 0
     msg_Dbg( s, "AStreamReadStream: %d pos="I64Fd" tk=%d start="I64Fd
              " offset=%d end="I64Fd,