From c9bca801324f03746757aef8549ebd26599adec2 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Fri, 24 Feb 2012 23:27:14 -0500 Subject: avutil: add AVERROR_UNKNOWN Useful to return instead of -1 when the cause of the error is unknown, typically from an external library. --- libavutil/avutil.h | 4 ++-- libavutil/error.c | 1 + libavutil/error.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'libavutil') diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 8d474e4546..c9c71415e9 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -153,8 +153,8 @@ */ #define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 23 -#define LIBAVUTIL_VERSION_MICRO 1 +#define LIBAVUTIL_VERSION_MINOR 24 +#define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ diff --git a/libavutil/error.c b/libavutil/error.c index a330e9f99c..21b68762d2 100644 --- a/libavutil/error.c +++ b/libavutil/error.c @@ -39,6 +39,7 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size) case AVERROR_PROTOCOL_NOT_FOUND:errstr = "Protocol not found" ; break; case AVERROR_STREAM_NOT_FOUND: errstr = "Stream not found" ; break; case AVERROR_BUG: errstr = "Bug detected, please report the issue" ; break; + case AVERROR_UNKNOWN: errstr = "Unknown error occurred" ; break; } if (errstr) { diff --git a/libavutil/error.h b/libavutil/error.h index 2db65cb83f..11bcc5c4c4 100644 --- a/libavutil/error.h +++ b/libavutil/error.h @@ -58,6 +58,7 @@ #define AVERROR_PROTOCOL_NOT_FOUND (-MKTAG(0xF8,'P','R','O')) ///< Protocol not found #define AVERROR_STREAM_NOT_FOUND (-MKTAG(0xF8,'S','T','R')) ///< Stream not found #define AVERROR_BUG (-MKTAG( 'B','U','G',' ')) ///< Bug detected, please report the issue +#define AVERROR_UNKNOWN (-MKTAG( 'U','N','K','N')) ///< Unknown error, typically from an external library /** * Put a description of the AVERROR code errnum in errbuf. -- cgit v1.2.3