This fixes error handling for BeOS, removing the need for some ifdefs.

AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h.
Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed.
Please from now on use return AVERROR(EFOO) instead of the ugly return -EFOO in your code.
This also removes the need for berrno.h.

Originally committed as revision 7965 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
François Revol
2007-02-13 18:26:14 +00:00
parent bcdf0d2697
commit 8fa36ae09d
32 changed files with 93 additions and 97 deletions

View File

@@ -25,8 +25,8 @@
extern "C" {
#endif
#define LIBAVFORMAT_VERSION_INT ((51<<16)+(9<<8)+0)
#define LIBAVFORMAT_VERSION 51.9.0
#define LIBAVFORMAT_VERSION_INT ((51<<16)+(10<<8)+0)
#define LIBAVFORMAT_VERSION 51.10.0
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
@@ -433,14 +433,6 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
/* no av_open for output, so applications will need this: */
AVFormatContext *av_alloc_format_context(void);
#define AVERROR_UNKNOWN (-1) /* unknown error */
#define AVERROR_IO (-2) /* i/o error */
#define AVERROR_NUMEXPECTED (-3) /* number syntax expected in filename */
#define AVERROR_INVALIDDATA (-4) /* invalid data found */
#define AVERROR_NOMEM (-5) /* not enough memory */
#define AVERROR_NOFMT (-6) /* unknown format */
#define AVERROR_NOTSUPP (-7) /* operation not supported */
int av_find_stream_info(AVFormatContext *ic);
int av_read_packet(AVFormatContext *s, AVPacket *pkt);
int av_read_frame(AVFormatContext *s, AVPacket *pkt);