[FFmpeg-cvslog] http: Clear the auth state on redirects
Martin Storsjö
git at videolan.org
Wed Mar 14 03:54:17 CET 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Mar 12 14:03:46 2012 +0200| [499ad54d982307a31ef70f6256a9ffccff0057e5] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=499ad54d982307a31ef70f6256a9ffccff0057e5
---
libavformat/http.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index a768b19..c69e3f5 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;
More information about the ffmpeg-cvslog
mailing list