[vlc-devel] commit: Fixed a stream block mode seeking corner case. (Laurent Aimar )

git version control git at videolan.org
Tue Jan 20 22:29:22 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Jan 20 21:32:45 2009 +0100| [31346a791f1be43bf6fb22c1ad88b2971d0c798a] | committer: Laurent Aimar 

Fixed a stream block mode seeking corner case.

 Seeking on a block boundary that is exactly the end of our already
cached data was incorrect.

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

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

diff --git a/src/input/stream.c b/src/input/stream.c
index d92c5d0..ec9788f 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -967,7 +967,7 @@ static int AStreamSeekBlock( stream_t *s, int64_t i_pos )
         }
         while( p_sys->block.i_start + p_sys->block.i_size < i_pos );
 
-        p_sys->block.i_offset = i_pos - p_sys->i_pos;
+        p_sys->block.i_offset += i_pos - p_sys->i_pos;
         p_sys->i_pos = i_pos;
 
         return VLC_SUCCESS;




More information about the vlc-devel mailing list