[PATCH 1/5] Drop AVERROR_NOTSUPP at the next major bump, use AVERROR(ENOSYS) instead which is semantically equivalent.

Stefano Sabatini stefano.sabatini-lala
Fri Apr 2 15:11:03 CEST 2010


---
 libavformat/file.c    |    2 +-
 libavformat/librtmp.c |    2 +-
 libavutil/error.c     |    1 -
 libavutil/error.h     |    2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavformat/file.c b/libavformat/file.c
index 9b60a5f..7a4c754 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -74,7 +74,7 @@ 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 AVERROR(ENOSYS);
     return lseek(fd, pos, whence);
 }
 
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 82f1bc8..1ac8ee2 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -124,7 +124,7 @@ static int64_t rtmp_read_seek(URLContext *s, int stream_index,
     RTMP *r = s->priv_data;
 
     if (flags & AVSEEK_FLAG_BYTE)
-        return AVERROR_NOTSUPP;
+        return AVERROR(ENOSYS);
 
     /* seeks are in milliseconds */
     timestamp = av_rescale(timestamp, AV_TIME_BASE, 1000);
diff --git a/libavutil/error.c b/libavutil/error.c
index 88d9ad6..a1a0b87 100644
--- a/libavutil/error.c
+++ b/libavutil/error.c
@@ -27,7 +27,6 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
     switch (errnum) {
     case AVERROR_EOF:               errstr = "End of file"; break;
     case AVERROR_INVALIDDATA:       errstr = "Invalid data found when processing input"; break;
-    case AVERROR_NOTSUPP:           errstr = "Operation not supported"; break;
     case AVERROR_NUMEXPECTED:       errstr = "Number syntax expected in filename"; break;
     case AVERROR_PATCHWELCOME:      errstr = "Not yet implemented in FFmpeg, patches welcome"; break;
     }
diff --git a/libavutil/error.h b/libavutil/error.h
index c757981..2220be9 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -43,12 +43,12 @@
 #define AVERROR_NOENT       AVERROR(ENOENT)  ///< No such file or directory
 #define AVERROR_NOFMT       AVERROR(EILSEQ)  ///< Unknown format
 #define AVERROR_NOMEM       AVERROR(ENOMEM)  ///< Not enough memory
+#define AVERROR_NOTSUPP     AVERROR(ENOSYS)  ///< Operation not supported
 #define AVERROR_NUMEXPECTED AVERROR(EDOM)    ///< Number syntax expected in filename
 #define AVERROR_UNKNOWN     AVERROR(EINVAL)  ///< Unknown error
 #endif
 
 #define AVERROR_EOF         AVERROR(EPIPE)   ///< End of file
-#define AVERROR_NOTSUPP     AVERROR(ENOSYS)  ///< Operation not supported
 
 #define AVERROR_PATCHWELCOME    (-MKTAG('P','A','W','E')) ///< Not yet implemented in FFmpeg, patches welcome
 
-- 
1.7.0


--oyUTqETQ0mS9luUI--



More information about the ffmpeg-devel mailing list