vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Thu Sep 3 21:50:01 2015 +0300| [9d635a91825bc9b550a0b9d6dcee7b1424698dd5] | committer: Rémi Denis-Courmont
stream: fix seeking within the peek buffer > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d635a91825bc9b550a0b9d6dcee7b1424698dd5 --- src/input/stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/input/stream.c b/src/input/stream.c index fbfe63f..5d8da22 100644 --- a/src/input/stream.c +++ b/src/input/stream.c @@ -459,9 +459,10 @@ int stream_Seek(stream_t *s, uint64_t offset) block_t *peek = priv->peek; if (peek != NULL) { - if (priv->offset >= offset) + if ((priv->offset - peek->i_buffer) <= offset + && offset <= priv->offset) { - uint64_t fwd = priv->offset - offset; + size_t fwd = offset - (priv->offset - priv->peek->i_buffer); if (fwd <= peek->i_buffer) { /* Seeking within the peek buffer */ peek->p_buffer += fwd; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
