Commit 70c9d400 authored by Andrey Utkin's avatar Andrey Utkin Committed by Michael Niedermayer

avformat/http: pass return code from http_open_cnx_internal() on its failure

Previously, AVERROR(EIO) was returned on failure of
http_open_cnx_internal(). Now the value is passed to upper level, thus
it is possible to distinguish ECONNREFUSED, ETIMEDOUT, ENETUNREACH etc.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5ea0753a
...@@ -250,6 +250,8 @@ redo: ...@@ -250,6 +250,8 @@ redo:
fail: fail:
if (s->hd) if (s->hd)
ffurl_closep(&s->hd); ffurl_closep(&s->hd);
if (location_changed < 0)
return location_changed;
return ff_http_averror(s->http_code, AVERROR(EIO)); return ff_http_averror(s->http_code, AVERROR(EIO));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment