[FFmpeg-cvslog] http: Always allow no-op seek
Anssi Hannula
git at videolan.org
Wed Mar 12 04:37:31 CET 2014
ffmpeg | branch: master | Anssi Hannula <anssi.hannula at iki.fi> | Thu Mar 6 18:40:01 2014 +0100| [ab76d9f628ad46e1d3bbf26c5bf1f87083f239ab] | committer: Luca Barbato
http: Always allow no-op seek
This also allows checking stream position as per ffurl_seek() doxy.
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab76d9f628ad46e1d3bbf26c5bf1f87083f239ab
---
libavformat/http.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/http.c b/libavformat/http.c
index 2009621..cf4ccab 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -901,6 +901,9 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence)
if (whence == AVSEEK_SIZE)
return s->filesize;
+ else if ((whence == SEEK_CUR && off == 0) ||
+ (whence == SEEK_SET && off == s->off))
+ return s->off;
else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)
return AVERROR(ENOSYS);
More information about the ffmpeg-cvslog
mailing list