diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2024-04-22 15:25:39 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2024-04-25 14:13:47 +0100 |
commit | bcae59b8982f0836bfa1f86b320a199f20ca9afc (patch) | |
tree | 1d7c8e3ce75049b67c87a10448495298db9d3ab1 /libavutil | |
parent | 5fc4a824db166823cd40eb8e16bce2a92af7abfd (diff) | |
download | ffmpeg-bcae59b8982f0836bfa1f86b320a199f20ca9afc.tar.gz |
avutil/error: Add HTTP 429 Too Many Requests AVERROR code
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>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/error.c | 1 | ||||
-rw-r--r-- | libavutil/error.h | 1 | ||||
-rw-r--r-- | libavutil/version.h | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/error.c b/libavutil/error.c index 938a8bc000..90bab7b9d3 100644 --- a/libavutil/error.c +++ b/libavutil/error.c @@ -61,6 +61,7 @@ static const struct error_entry error_entries[] = { { ERROR_TAG(HTTP_UNAUTHORIZED), "Server returned 401 Unauthorized (authorization failed)" }, { ERROR_TAG(HTTP_FORBIDDEN), "Server returned 403 Forbidden (access denied)" }, { ERROR_TAG(HTTP_NOT_FOUND), "Server returned 404 Not Found" }, + { ERROR_TAG(HTTP_TOO_MANY_REQUESTS), "Server returned 429 Too Many Requests" }, { ERROR_TAG(HTTP_OTHER_4XX), "Server returned 4XX Client Error, but not one of 40{0,1,3,4}" }, { ERROR_TAG(HTTP_SERVER_ERROR), "Server returned 5XX Server Error reply" }, #if !HAVE_STRERROR_R diff --git a/libavutil/error.h b/libavutil/error.h index 0d3269aa6d..1efa86c4c1 100644 --- a/libavutil/error.h +++ b/libavutil/error.h @@ -79,6 +79,7 @@ #define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1') #define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3') #define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4') +#define AVERROR_HTTP_TOO_MANY_REQUESTS FFERRTAG(0xF8,'4','2','9') #define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X') #define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X') diff --git a/libavutil/version.h b/libavutil/version.h index ea289c406f..735f6832e3 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -80,7 +80,7 @@ #define LIBAVUTIL_VERSION_MAJOR 59 #define LIBAVUTIL_VERSION_MINOR 16 -#define LIBAVUTIL_VERSION_MICRO 100 +#define LIBAVUTIL_VERSION_MICRO 101 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ |