1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

Do not call lseek() with invalid whence value

Originally committed as revision 21795 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2010-02-13 16:56:37 +00:00
parent 5ca43c25f6
commit f2a4f12cb6

View File

@ -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);
}