This is a common error code from e.g. CDNs or cloud storage, and
it is useful to be able to handle it differently to a generic
4XX code.
Its source is RFC6585.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Up until now, including error.h alone does not make the AVERROR_* defines
usable, because they just expand to something involving MKTAG, but
without the header providing MKTAG. So include macros.h, the header
providing MKTAG.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This code is intended for errors in external libraries
when no corresponding error code can be found.
AVERROR_UNKNOWN is too vague for that and looks like AVERROR_BUG.
The errors need to be defined before including functions depending on
them. See av_size_mult() for instance. stddef.h is included for the
prototype of av_sterror (use of size_t).
Based on a patch by Robert Nagy <ronag89@gmail.com>.
It makes a difference when the error code is immediately cast
into a larger integer, such as an int64_t.
The removal was not applied when merging the Libav patches, because
there was still code referencing the symbols.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
The current value is masking the POSIX error code EPIPE, which has a
different semantics.
This breaks API.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and
has a too much specific meaning, which is better explained through a
log message. Thus it can be replaced by AVERROR(EINVAL).
This breaks API.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
The new error code is better than AVERROR(ENOENT), which has a
completely different semantics ("No such file or directory").
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This is different from AVERROR(EINTR) because calls that fail with EINTR
should usually be restarted.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
not defined.
This allows applications to check if av_strerror() cannot provide a
meaningful representation for the provided error code, without having
to actually check the filled string.
Originally committed as revision 23031 to svn://svn.ffmpeg.org/ffmpeg/trunk
number if strerror_r() did not succeed for whatever reason.
This avoids the need for the application to fill the string in case
strerror_r() fails, for example because the error code is not known.
Originally committed as revision 23015 to svn://svn.ffmpeg.org/ffmpeg/trunk
instead which is semantically equivalent.
See the thread:
Subject: [FFmpeg-devel] [RFC] The meaning of AVERROR_NOTSUPP
Date: Sat, 27 Mar 2010 00:51:13 +0100
Originally committed as revision 22981 to svn://svn.ffmpeg.org/ffmpeg/trunk
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
major bump, using an FFmpeg specific error code rather than EINVAL,
which has a quite different semantics.
Originally committed as revision 22601 to svn://svn.ffmpeg.org/ffmpeg/trunk
major bump, using an FFmpeg specific error code rather than EDOM,
which has a quite different semantics.
Originally committed as revision 22528 to svn://svn.ffmpeg.org/ffmpeg/trunk
AVERROR(ENOMEM) must be used instead, and there are no occurrences of
AVERROR_ENOMEM in the FFmpeg basecode so it can be safely dropped.
Originally committed as revision 22514 to svn://svn.ffmpeg.org/ffmpeg/trunk
avctx->get_buffer() in case of error, rather than AVERROR_UNKNOWN
which is deprecated, and mark AVERROR_UNKNOWN for deletion at the next
major bump.
Originally committed as revision 22512 to svn://svn.ffmpeg.org/ffmpeg/trunk