diff options
author | wm4 <wm4@nowhere> | 2013-07-07 20:13:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-07 21:10:44 +0200 |
commit | dbf2a6f7d0a9ae09bac024cf3ad4e7b27d303cb6 (patch) | |
tree | cce7f67c2505e2d591b903bc593cf94a5261ad6c /stream/stream.c | |
parent | e670dd73103865d5fadc437d88b0203900b7f034 (diff) | |
download | mpv-dbf2a6f7d0a9ae09bac024cf3ad4e7b27d303cb6.tar.bz2 mpv-dbf2a6f7d0a9ae09bac024cf3ad4e7b27d303cb6.tar.xz |
stream: re-add accidentally removed seek call
This was under CONFIG_NETWORKING, so in theory it should have been save
to remove. But actually this disables forward skipping when reading
from a pipe. (Still a questionable feature, because it doesn't behave
well with libavformat - but it was not supposed to be changed.)
Diffstat (limited to 'stream/stream.c')
-rw-r--r-- | stream/stream.c | 7 |
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"); |