diff --git a/libavutil/error.h b/libavutil/error.h
index 62e75e136d0b5f746e5c8a24ec5d825fd87daf13..a422f8555c5e1ab76bdb0801a174ae2bbb08be04 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -37,7 +37,7 @@
 #define AVUNERROR(e) (e)
 #endif
 
-#define AVERROR_EOF         AVERROR(EPIPE)   ///< End of file
+#define AVERROR_EOF             (-MKTAG('E','O','F',' ')) ///< End of file
 
 #define AVERROR_PATCHWELCOME    (-MKTAG('P','A','W','E')) ///< Not yet implemented in Libav, patches welcome