[FFmpeg-devel] [PATCH] Move error codes definitions from lavc to lavu
Stefano Sabatini
stefano.sabatini-lala
Mon Mar 8 21:46:15 CET 2010
On date Monday 2010-03-08 11:13:28 +0100, Michael Niedermayer encoded:
> On Mon, Mar 08, 2010 at 12:09:49AM +0100, Stefano Sabatini wrote:
[...]
> > Subject: [PATCH] Move error code definitions from libavcodec/avcodec.h to
> > libavutil/error.h, and mark the old definitions to be dropped at the
> > next major bump.
> >
> > Error code definitions and handling code belongs to libavutil, where
> > it can be shared by all the libav* libraries.
> > ---
> > libavcodec/avcodec.h | 3 ++-
> > libavutil/Makefile | 1 +
> > libavutil/avutil.h | 3 ++-
> > libavutil/error.h | 37 +++++++++++++++++++++++++++++++++++++
> > 4 files changed, 42 insertions(+), 2 deletions(-)
> > create mode 100644 libavutil/error.h
> >
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index 8983f05..64cfb26 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -3810,6 +3810,7 @@ int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
> > */
> > int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
> >
> > +#if LIBAVCODEC_VERSION_MAJOR < 53
> > /* error handling */
> > #if EINVAL > 0
> > #define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
> > @@ -3828,7 +3829,7 @@ int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
> > #define AVERROR_NOTSUPP AVERROR(ENOSYS) /**< Operation not supported. */
> > #define AVERROR_NOENT AVERROR(ENOENT) /**< No such file or directory. */
>
> > #define AVERROR_EOF AVERROR(EPIPE) /**< End of file. */
>
> iam not sure about droping this one
Updates:
* do not keep AVERROR(e) definition in avcodec.h, as it is now defined
in libavutil/error.h
* define the FFmpeg specific AVERROR_EOF error code in
libavutil/error.h, this will be enabled when libavcodec version will
be bumped and the old AVERROR_EOF definition will be dropped.
Regards.
--
FFmpeg = Faithless and Faithless Monstrous Puritan Educated Game
More information about the ffmpeg-devel
mailing list