summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
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);