]> git.sesse.net Git - vlc/commitdiff
Fixed a stream block mode seeking corner case.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 20 Jan 2009 20:32:45 +0000 (21:32 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 20 Jan 2009 20:32:45 +0000 (21:32 +0100)
 Seeking on a block boundary that is exactly the end of our already
cached data was incorrect.

src/input/stream.c

index d92c5d0ae2670dddb0049b18eaa7b88d4bbd89ca..ec9788f74cf98478c66116c192778089a5d72c6d 100644 (file)
@@ -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;