[FFmpeg-cvslog] lavf/http: return error from seek on invalid whence

Lukasz Marek git at videolan.org
Thu Mar 6 02:09:18 CET 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Fri Feb 28 00:36:07 2014 +0100| [1aa262f460c0814e71619a66a9652af4692a468a] | committer: Lukasz Marek

lavf/http: return error from seek on invalid whence

Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1aa262f460c0814e71619a66a9652af4692a468a
---

 libavformat/http.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index 08832bd..74e8162 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -959,6 +959,8 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence)
         off += s->off;
     else if (whence == SEEK_END)
         off += s->filesize;
+    else if (whence != SEEK_SET)
+        return AVERROR(EINVAL);
     if (off < 0)
         return AVERROR(EINVAL);
     s->off = off;



More information about the ffmpeg-cvslog mailing list