diff options
author | wm4 <wm4@nowhere> | 2013-12-14 00:52:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-14 00:52:39 +0100 |
commit | 9a723fc03b5b8114abca2bfa7aa8b54f111d6702 (patch) | |
tree | f82407aaf9369b4dc46ba0c3422c04e6fb755889 | |
parent | 600bccdf2aafba49f3aa19c774c3cdc025e93368 (diff) | |
download | mpv-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.
-rw-r--r-- | stream/stream.c | 3 |
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); |