Allow back seeking after an access EOF.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 4 May 2009 18:44:21 +0000 (20:44 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 4 May 2009 19:02:04 +0000 (21:02 +0200)
It is up to the access to refuse if it can't.
Anyway, the check was only for one path of a seek command (when using
stream_Read( NULL, size)).
This partially revert fc9f8518, please report any breakage.

src/input/stream.c

index 08075dc..286af64 100644 (file)
@@ -1058,14 +1058,10 @@ static int AStreamReadStream( stream_t *s, void *p_read, unsigned int i_read )
         stream_sys_t *p_sys = s->p_sys;
         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 AStreamSeekStream( s, p_sys->i_pos + i_read ) ? 0 : i_read;
-        }
+        bool   b_aseek;
+        access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek );
+        if( b_aseek )
+            return AStreamSeekStream( s, p_sys->i_pos + i_read ) ? 0 : i_read;
     }
 
 #ifdef STREAM_DEBUG