diff options
author | Martin Storsjö <martin@martin.st> | 2012-03-12 14:03:46 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-03-13 11:19:29 +0200 |
commit | 499ad54d982307a31ef70f6256a9ffccff0057e5 (patch) | |
tree | af90cfa03dcb1d1d78f0f712109053a75d7f1d76 | |
parent | e75bbcf493aeb549d04c56f49406aeee3950d93b (diff) | |
download | ffmpeg-499ad54d982307a31ef70f6256a9ffccff0057e5.tar.gz |
http: Clear the auth state on redirects
Currently we only try continuing with the same auth mechanism
as the initial request.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index a768b19fd9..c69e3f5055 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -168,6 +168,9 @@ static int http_open_cnx(URLContext *h) ffurl_close(hd); if (redirects++ >= MAX_REDIRECTS) return AVERROR(EIO); + /* Restart the authentication process with the new target, which + * might use a different auth mechanism. */ + memset(&s->auth_state, 0, sizeof(s->auth_state)); attempts = 0; location_changed = 0; goto redo; |