Browse Source

avutil: add AVERROR_UNKNOWN

Useful to return instead of -1 when the cause of the error is unknown,
typically from an external library.
tags/n0.11
Justin Ruggles 13 years ago
parent
commit
c9bca80132
4 changed files with 7 additions and 2 deletions
  1. +3
    -0
      doc/APIchanges
  2. +2
    -2
      libavutil/avutil.h
  3. +1
    -0
      libavutil/error.c
  4. +1
    -0
      libavutil/error.h

+ 3
- 0
doc/APIchanges View File

@@ -12,6 +12,9 @@ libavutil: 2011-04-18

API changes, most recent first:

2012-xx-xx - xxxxxxx - lavu 51.24.0 - error.h
Add AVERROR_UNKNOWN

2012-xx-xx - xxxxxxx - lavc 54.x.x
Add duration field to AVCodecParserContext



+ 2
- 2
libavutil/avutil.h View File

@@ -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, \


+ 1
- 0
libavutil/error.c View File

@@ -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) {


+ 1
- 0
libavutil/error.h View File

@@ -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.


Loading…
Cancel
Save