mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/http: Use ff_http_averror()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9d86ce783b
commit
81ce3f8e80
@ -250,7 +250,7 @@ redo:
|
|||||||
fail:
|
fail:
|
||||||
if (s->hd)
|
if (s->hd)
|
||||||
ffurl_closep(&s->hd);
|
ffurl_closep(&s->hd);
|
||||||
return AVERROR(EIO);
|
return ff_http_averror(s->http_code, AVERROR(EIO));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_http_do_new_request(URLContext *h, const char *uri)
|
int ff_http_do_new_request(URLContext *h, const char *uri)
|
||||||
@ -371,7 +371,7 @@ static int check_http_code(URLContext *h, int http_code, const char *end)
|
|||||||
(http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) {
|
(http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) {
|
||||||
end += strspn(end, SPACE_CHARS);
|
end += strspn(end, SPACE_CHARS);
|
||||||
av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", http_code, end);
|
av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", http_code, end);
|
||||||
return AVERROR(EIO);
|
return ff_http_averror(http_code, AVERROR(EIO));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1284,7 +1284,7 @@ redo:
|
|||||||
|
|
||||||
if (s->http_code < 400)
|
if (s->http_code < 400)
|
||||||
return 0;
|
return 0;
|
||||||
ret = AVERROR(EIO);
|
ret = ff_http_averror(s->http_code, AVERROR(EIO));
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
http_proxy_close(h);
|
http_proxy_close(h);
|
||||||
|
Loading…
Reference in New Issue
Block a user