comparison file.c @ 5654:2f09b8dc4e08 libavformat

Do not call lseek() with invalid whence value
author mru
date Sat, 13 Feb 2010 16:56:37 +0000
parents 147adb327b84
children 310b3b1b2921
comparison
equal deleted inserted replaced
5653:25eca7e2cf64 5654:2f09b8dc4e08
71 71
72 /* XXX: use llseek */ 72 /* XXX: use llseek */
73 static int64_t file_seek(URLContext *h, int64_t pos, int whence) 73 static int64_t file_seek(URLContext *h, int64_t pos, int whence)
74 { 74 {
75 int fd = (intptr_t) h->priv_data; 75 int fd = (intptr_t) h->priv_data;
76 if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END)
77 return AVERROR_NOTSUPP;
76 return lseek(fd, pos, whence); 78 return lseek(fd, pos, whence);
77 } 79 }
78 80
79 static int file_close(URLContext *h) 81 static int file_close(URLContext *h)
80 { 82 {