lavf/http: return error from seek on invalid whence

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
pull/293/head
Lukasz Marek 11 years ago
parent 4ba6a534dc
commit 1aa262f460
  1. 2
      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;

Loading…
Cancel
Save