From: Laurent Aimar Date: Tue, 20 Jan 2009 20:32:45 +0000 (+0100) Subject: Fixed a stream block mode seeking corner case. X-Git-Tag: 1.0.0-pre1~1171 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=31346a791f1be43bf6fb22c1ad88b2971d0c798a;hp=c759006f6e001e0c38b5903a9454bab7d3f35748;p=vlc 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. --- diff --git a/src/input/stream.c b/src/input/stream.c index d92c5d0ae2..ec9788f74c 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;