[fix-error-codes-handling PATCH] Change the definition of AVERROR_EOF, using an FFmpeg specific error code rather than EPIPE, which has a different semantics.

Stefano Sabatini stefano.sabatini-lala
Sat Jul 17 15:14:17 CEST 2010


The change will happen togheter with the other error code
redefinitions which would cause an API break in all the libraries
depending on libavutil.
---
 libavutil/error.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/error.h b/libavutil/error.h
index 17c26d5..506e0d0 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -46,14 +46,14 @@
 #define AVERROR_UNKNOWN     AVERROR(EINVAL)  ///< Unknown error
 #endif
 
-#define AVERROR_EOF         AVERROR(EPIPE)   ///< End of file
-
 #define AVERROR_PATCHWELCOME    (-MKTAG('P','A','W','E')) ///< Not yet implemented in FFmpeg, patches welcome
 
 #if LIBAVUTIL_VERSION_MAJOR > 999
+#define AVERROR_EOF             (-MKTAG('E','O','F',' ')) ///< End of file
 #define AVERROR_INVALIDDATA     (-MKTAG('I','N','D','A')) ///< Invalid data found when processing input
 #define AVERROR_NUMEXPECTED     (-MKTAG('N','U','E','X')) ///< Number syntax expected in filename
 #else
+#define AVERROR_EOF         AVERROR(EPIPE)   ///< End of file
 #define AVERROR_INVALIDDATA AVERROR(EINVAL)  ///< Invalid data found when processing input
 #define AVERROR_NUMEXPECTED AVERROR(EDOM)    ///< Number syntax expected in filename
 #endif
-- 
1.6.0.4


--CUfgB8w4ZwR/yMy5--



More information about the ffmpeg-devel mailing list