[vlc-devel] commit: Allow back seeking after an access EOF. (Laurent Aimar )

git version control git at videolan.org
Mon May 4 21:02:56 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon May  4 20:44:21 2009 +0200| [7f581337994e9073382db9cc9056bc0189e8bf77] | committer: Laurent Aimar 

Allow back seeking after an access EOF.

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f581337994e9073382db9cc9056bc0189e8bf77
---

 src/input/stream.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 08075dc..286af64 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -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




More information about the vlc-devel mailing list