From 9a723fc03b5b8114abca2bfa7aa8b54f111d6702 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Dec 2013 00:52:39 +0100 Subject: stream: don't seek when seeking to the same position There was already something similar in the code that did the actual seek, but I think seeking to the same position could still trigger an actual seek due to weid interaction with the buffer. --- stream/stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stream/stream.c b/stream/stream.c index ecda83e4aa..8a31b45254 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -681,6 +681,9 @@ int stream_seek(stream_t *s, int64_t pos) mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos); + if (pos == stream_tell(s)) + return 1; + if (pos < 0) { mp_msg(MSGT_DEMUX, MSGL_ERR, "Invalid seek to negative position %llx!\n", (long long)pos); -- cgit v1.2.3