diff options
author | Lukasz Marek <lukasz.m.luki@gmail.com> | 2014-02-28 03:36:07 +0400 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki@gmail.com> | 2014-03-06 03:32:24 +0400 |
commit | 1aa262f460c0814e71619a66a9652af4692a468a (patch) | |
tree | aa6fd5ba43e881c5f1421dc3bf3ab76be649c939 /libavformat/http.c | |
parent | 4ba6a534dc94bd4ff44503de9c7985a456cfe503 (diff) |
lavf/http: return error from seek on invalid whence
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r-- | libavformat/http.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 08832bde59..74e81625cd 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; |