diff --git a/libavformat/http.c b/libavformat/http.c index f58c78a49bca54ef08d4056b2e3ac2bbe16cefec..e9fab3b6162b1c7b611ba26c3d2aa1c9c1bf19c8 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -138,7 +138,8 @@ static int http_open_cnx(URLContext *h) } else goto fail; } - if ((s->http_code == 302 || s->http_code == 303) && location_changed == 1) { + if ((s->http_code == 301 || s->http_code == 302 || s->http_code == 303 || s->http_code == 307) + && location_changed == 1) { /* url moved, get next */ url_close(hd); if (redirects++ >= MAX_REDIRECTS)