aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBrandon Lees <brandon@n-hega.com>2014-11-14 18:05:44 -0500
committerMichael Niedermayer <michaelni@gmx.at>2014-11-15 14:30:32 +0100
commitffaf2074ebbca70bdd02819f383710b34d168e31 (patch)
treea1c059583a7d1020cb3857aef6240bb49dbad3b3 /libavformat
parent12630fa821ea4b0daddf768eeb29103774e34033 (diff)
downloadffmpeg-ffaf2074ebbca70bdd02819f383710b34d168e31.tar.gz
Fix the timeout option not working when connecting to a HTTP url that requires authentication.
In http_open_cnx, the patch restores the AVDictionary if connection needs to be re-tried because of a authentication/redirect status code. Previously, if a 401/407/30x status code was encountered, http_open_cnx would restart at the redo label, but any options used by the underlying protocol would be missing because they were removed by the first attempt. Signed-off-by: Brandon Lees <brandon@n-hega.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index dfc01eee4c..f17b2f8db8 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -207,6 +207,9 @@ static int http_open_cnx(URLContext *h, AVDictionary **options)
HTTPContext *s = h->priv_data;
int location_changed, attempts = 0, redirects = 0;
redo:
+ if (attempts > 0)
+ av_dict_copy(options, s->chained_options, 0);
+
cur_auth_type = s->auth_state.auth_type;
cur_proxy_auth_type = s->auth_state.auth_type;