Would make much easier enlarge it when needed.
---
 libavformat/http.c     | 2 +-
 libavformat/http.h     | 2 ++
 libavformat/mmsh.c     | 2 +-
 libavformat/rtmphttp.c | 2 +-
 libavformat/rtsp.c     | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 6c390e8..d7f6029 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -529,7 +529,7 @@ static int http_connect(URLContext *h, const char *path, 
const char *local_path,
 {
     HTTPContext *s = h->priv_data;
     int post, err;
-    char headers[1024] = "";
+    char headers[HTTP_HEADERS_SIZE] = "";
     char *authstr = NULL, *proxyauthstr = NULL;
     int64_t off = s->off;
     int len = 0;
diff --git a/libavformat/http.h b/libavformat/http.h
index f0d9d4a..3d301a7 100644
--- a/libavformat/http.h
+++ b/libavformat/http.h
@@ -24,6 +24,8 @@
 
 #include "url.h"
 
+#define HTTP_HEADERS_SIZE 1024
+
 /**
  * Initialize the authentication state based on another HTTP URLContext.
  * This can be used to pre-initialize the authentication parameters if
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index 5e9d0bc..18a2ff5 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -215,7 +215,7 @@ static int mmsh_open(URLContext *h, const char *uri, int 
flags)
     int i, port, err;
     char httpname[256], path[256], host[128], location[1024];
     char *stream_selection = NULL;
-    char headers[1024];
+    char headers[HTTP_HEADERS_SIZE];
     MMSHContext *mmsh = h->priv_data;
     MMSContext *mms;
 
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
index 34c68fb..ce4c985 100644
--- a/libavformat/rtmphttp.c
+++ b/libavformat/rtmphttp.c
@@ -184,7 +184,7 @@ static int rtmp_http_close(URLContext *h)
 static int rtmp_http_open(URLContext *h, const char *uri, int flags)
 {
     RTMP_HTTPContext *rt = h->priv_data;
-    char headers[1024], url[1024];
+    char headers[HTTP_HEADERS_SIZE], url[1024];
     int ret, off = 0;
 
     av_url_split(NULL, 0, NULL, 0, rt->host, sizeof(rt->host), &rt->port,
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 23d7da1..024eed0 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1654,7 +1654,7 @@ redirect:
         /* set up initial handshake for tunneling */
         char httpname[1024];
         char sessioncookie[17];
-        char headers[1024];
+        char headers[HTTP_HEADERS_SIZE];
 
         ff_url_join(httpname, sizeof(httpname), "http", auth, host, port, 
"%s", path);
         snprintf(sessioncookie, sizeof(sessioncookie), "%08x%08x",
-- 
1.9.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to