From dbf2a6f7d0a9ae09bac024cf3ad4e7b27d303cb6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Jul 2013 20:13:42 +0200 Subject: 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.) --- stream/stream.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'stream/stream.c') 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"); -- cgit v1.2.3