summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-14 00:52:39 +0100
committerwm4 <wm4@nowhere>2013-12-14 00:52:39 +0100
commit9a723fc03b5b8114abca2bfa7aa8b54f111d6702 (patch)
treef82407aaf9369b4dc46ba0c3422c04e6fb755889 /stream
parent600bccdf2aafba49f3aa19c774c3cdc025e93368 (diff)
downloadmpv-9a723fc03b5b8114abca2bfa7aa8b54f111d6702.tar.bz2
mpv-9a723fc03b5b8114abca2bfa7aa8b54f111d6702.tar.xz
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.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream.c3
1 files changed, 3 insertions, 0 deletions
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);