]> git.sesse.net Git - vlc/commitdiff
stream: Don't attempt to seek() when reading to NULL in *Immediate method, as pointed...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 6 Jun 2008 11:10:36 +0000 (13:10 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 6 Jun 2008 11:10:36 +0000 (13:10 +0200)
src/input/stream.c

index 16824cccc3e35fd9308e1a056d74a8e982c9f462..2aa946dedc91153787c7601f639e0b4fef45e72f 100644 (file)
@@ -1524,22 +1524,6 @@ static int AStreamReadImmediate( stream_t *s, void *p_read, int i_read )
              p_read, i_read );
 #endif
 
-    /* No buffer, do as if we were seeking. */
-    if( !p_read )
-    {
-        /* seek within this stream if possible, else use plain old read and discard */
-        access_t     *p_access = p_sys->p_access;
-
-        /* seeking after EOF is not what we want */
-        if( !( p_access->info.b_eof ) )
-        {
-            bool   b_aseek;
-            access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
-            if( b_aseek )
-                return AStreamSeekImmediate( s, p_sys->i_pos + i_read ) ? 0 : i_read;
-        }
-    }
-
     /* First, check if we already have some data in the buffer,
      * that we could copy directly */
     int i_copy = __MIN( stream_buffered_size( s ), i_read );