Commit a2c7d874 authored by mru's avatar mru

Do not call lseek() with invalid whence value

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21795 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fe15b8ac
......@@ -73,6 +73,8 @@ static int file_write(URLContext *h, unsigned char *buf, int size)
static int64_t file_seek(URLContext *h, int64_t pos, int whence)
{
int fd = (intptr_t) h->priv_data;
if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END)
return AVERROR_NOTSUPP;
return lseek(fd, pos, whence);
}
......
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