mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 22:01:10 +00:00
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.
This commit is contained in:
parent
600bccdf2a
commit
9a723fc03b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user