[PATCH 6/6] Make file_write() do not return AVERROR_NOTSUPP in case of invalid whence parameter, let lseek deal with the error condition instead, which in that case will return EINVAL.

Stefano Sabatini stefano.sabatini-lala
Sat Mar 27 11:45:32 CET 2010


---
 libavformat/file.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/libavformat/file.c b/libavformat/file.c
index 9b60a5f..d2cb530 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -73,8 +73,6 @@ 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);
 }
 
-- 
1.7.0


--huq684BweRXVnRxX--



More information about the ffmpeg-devel mailing list