[FFmpeg-cvslog] http: Use a constant for the supported header size

Luca Barbato git at videolan.org
Tue Jul 22 22:09:15 CEST 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Jul 22 16:37:09 2014 +0200| [7bdd2ff6825951f7a6a6008303acfce7c2a63532] | committer: Luca Barbato

http: Use a constant for the supported header size

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7bdd2ff6825951f7a6a6008303acfce7c2a63532
---

 libavformat/http.c |    2 +-
 libavformat/http.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

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



More information about the ffmpeg-cvslog mailing list