From f806e268c6c3a76f65b1282219e16fcdfb80a9b5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Aug 2013 18:23:33 +0200 Subject: stream: don't require streams to set s->pos in seek callback Instead, set s->pos depending on the success of the seek callback. --- stream/stream_lavf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'stream/stream_lavf.c') diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index 0526d701f9..cedea2fb4b 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -60,8 +60,7 @@ static int seek(stream_t *s, int64_t newpos) AVIOContext *avio = s->priv; if (!avio) return -1; - s->pos = newpos; - if (avio_seek(avio, s->pos, SEEK_SET) < 0) { + if (avio_seek(avio, newpos, SEEK_SET) < 0) { return 0; } return 1; -- cgit v1.2.3