[FFmpeg-cvslog] r21795 - trunk/libavformat/file.c

mru subversion
Sat Feb 13 17:56:37 CET 2010


Author: mru
Date: Sat Feb 13 17:56:37 2010
New Revision: 21795

Log:
Do not call lseek() with invalid whence value

Modified:
   trunk/libavformat/file.c

Modified: trunk/libavformat/file.c
==============================================================================
--- trunk/libavformat/file.c	Sat Feb 13 16:57:49 2010	(r21794)
+++ trunk/libavformat/file.c	Sat Feb 13 17:56:37 2010	(r21795)
@@ -73,6 +73,8 @@ static int file_write(URLContext *h, uns
 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);
 }
 



More information about the ffmpeg-cvslog mailing list