MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_http_averror

Function ff_http_averror

libavformat/http.c:592–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592int ff_http_averror(int status_code, int default_averror)
593{
594 switch (status_code) {
595 case 400: return AVERROR_HTTP_BAD_REQUEST;
596 case 401: return AVERROR_HTTP_UNAUTHORIZED;
597 case 403: return AVERROR_HTTP_FORBIDDEN;
598 case 404: return AVERROR_HTTP_NOT_FOUND;
599 case 429: return AVERROR_HTTP_TOO_MANY_REQUESTS;
600 default: break;
601 }
602 if (status_code >= 400 && status_code <= 499)
603 return AVERROR_HTTP_OTHER_4XX;
604 else if (status_code >= 500)
605 return AVERROR_HTTP_SERVER_ERROR;
606 else
607 return default_averror;
608}
609
610const char* ff_http_get_new_location(URLContext *h)
611{

Callers 5

http_open_cnxFunction · 0.85
check_http_codeFunction · 0.85
process_lineFunction · 0.85
http_proxy_openFunction · 0.85
ff_rtsp_averrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected