aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-02-24 23:27:14 -0500
committerReinhard Tartler <siretart@tauware.de>2012-03-04 12:26:06 +0100
commit7f3f85544ca7804fde2210c129a4458536330dc6 (patch)
tree6bdb67e54e83551e339a8102a224deeffd66bc46
parent750f5baf3036d5a4c488a60d1cd6e872e4a871c4 (diff)
downloadffmpeg-7f3f85544ca7804fde2210c129a4458536330dc6.tar.gz
avutil: add AVERROR_UNKNOWN
Useful to return instead of -1 when the cause of the error is unknown, typically from an external library. (cherry picked from commit c9bca801324f03746757aef8549ebd26599adec2) Conflicts: doc/APIchanges libavutil/avutil.h Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavutil/avutil.h2
-rw-r--r--libavutil/error.c1
-rw-r--r--libavutil/error.h1
4 files changed, 6 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 58186a082c..78e37f4e95 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
+2012-03-04 - xxxxxxx - lavu 51.22.1 - error.h
+ Add AVERROR_UNKNOWN
+
2012-02-29 - xxxxxxx - lavf 53.21.0
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 0e62b4a13f..05e9248375 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -155,7 +155,7 @@
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 22
-#define LIBAVUTIL_VERSION_MICRO 0
+#define LIBAVUTIL_VERSION_MICRO 1
#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.