[FFmpeg-devel] [PATCH] Move error codes definitions from lavc to lavu

Måns Rullgård mans
Mon Mar 8 00:21:07 CET 2010


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Sunday 2010-03-07 16:48:55 +0100, Michael Niedermayer encoded:
>> On Sun, Mar 07, 2010 at 03:32:00PM +0100, Stefano Sabatini wrote:
> [...]
>> >  #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
>> > diff --git a/libavutil/common.h b/libavutil/common.h
>> > index 4b757d1..547b7d0 100644
>> > --- a/libavutil/common.h
>> > +++ b/libavutil/common.h
>> > @@ -35,6 +35,16 @@
>> >  #include <stdlib.h>
>> >  #include <string.h>
>> >  
>> > +/** Returns a negative error code from a POSIX error code, to return from library functions. */
>> > +#if EINVAL > 0
>> > +#define AVERROR(e) (-(e))
>> > +#else
>> > +/* Some platforms have E* and errno already negated. */
>> > +#define AVERROR(e) (e)
>> > +#endif
>> > +
>> 
>> > +#define AVERROR_PATCHWELCOME    -MKTAG('P','A','W','E') ///< Not yet implemented in FFmpeg. Patches welcome.
>> 
>> missig ()
>
> Fixed.
>
> Also do you prefer to put error codes in libavutil/common.h or in a
> separate file libavutil/error.h? (I have a slightly preference for the
> second.)

I prefer error.h.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list