summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/http.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 53e7b1ba0f..c05cf4eeaf 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -317,7 +317,6 @@ static int process_line(URLContext *h, char *line, int line_count,
{
HTTPContext *s = h->priv_data;
char *tag, *p, *end;
- char redirected_location[MAX_URL_SIZE];
/* end of header */
if (line[0] == '\0') {
@@ -357,7 +356,9 @@ static int process_line(URLContext *h, char *line, int line_count,
while (av_isspace(*p))
p++;
if (!av_strcasecmp(tag, "Location")) {
- ff_make_absolute_url(redirected_location, sizeof(redirected_location), s->location, p);
+ char redirected_location[MAX_URL_SIZE];
+ ff_make_absolute_url(redirected_location, sizeof(redirected_location),
+ s->location, p);
av_strlcpy(s->location, redirected_location, sizeof(s->location));
*new_location = 1;
} else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) {