summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.utkin@corp.bluecherry.net>2014-10-23 20:55:46 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-10-23 20:58:21 +0200
commit70c9d400087c182ce670fcc008b05c2edabd73e9 (patch)
treeb5177f490ad100fa349a47df34de318361a5344a /libavformat/http.c
parent5ea0753a15367dc0f212e8652fab1d36dd491877 (diff)
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index d12dcaac16..dfc01eee4c 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -250,6 +250,8 @@ redo:
fail:
if (s->hd)
ffurl_closep(&s->hd);
+ if (location_changed < 0)
+ return location_changed;
return ff_http_averror(s->http_code, AVERROR(EIO));
}