summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c
index a1eec388d3..7f761f5c18 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -479,6 +479,13 @@ static int stream_seek_unbuffered(stream_t *s, int64_t newpos)
// Some streaming protocol allow to seek backward and forward
// A function call that return -1 can tell that the protocol
// doesn't support seeking.
+ if (s->seek) {
+ if (!s->seek(s, newpos)) {
+ mp_tmsg(MSGT_STREAM, MSGL_ERR, "Seek failed\n");
+ return 0;
+ }
+ break;
+ }
if (newpos < s->pos) {
mp_tmsg(MSGT_STREAM, MSGL_INFO,
"Cannot seek backward in linear streams!\n");