Commit 1aa262f4 authored by Lukasz Marek's avatar Lukasz Marek

lavf/http: return error from seek on invalid whence

Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki@gmail.com>
parent 4ba6a534
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment