Browse code

Move the definition of the maximum url size for static buffers to internal.h

Originally committed as revision 24833 to svn://svn.ffmpeg.org/ffmpeg/trunk

Martin Storsjö authored on 2010/08/19 23:50:40
Showing 2 changed files
... ...
@@ -35,7 +35,6 @@
35 35
 
36 36
 /* used for protocol handling */
37 37
 #define BUFFER_SIZE 1024
38
-#define URL_SIZE    4096
39 38
 #define MAX_REDIRECTS 8
40 39
 
41 40
 typedef struct {
... ...
@@ -46,7 +45,7 @@ typedef struct {
46 46
     int http_code;
47 47
     int64_t chunksize;      /**< Used if "Transfer-Encoding: chunked" otherwise -1. */
48 48
     int64_t off, filesize;
49
-    char location[URL_SIZE];
49
+    char location[MAX_URL_SIZE];
50 50
     HTTPAuthState auth_state;
51 51
     unsigned char headers[BUFFER_SIZE];
52 52
     int willclose;          /**< Set if the server correctly handles Connection: close and will close the connection after feeding us the content. */
... ...
@@ -162,7 +161,7 @@ static int http_open(URLContext *h, const char *uri, int flags)
162 162
     h->is_streamed = 1;
163 163
 
164 164
     s->filesize = -1;
165
-    av_strlcpy(s->location, uri, URL_SIZE);
165
+    av_strlcpy(s->location, uri, sizeof(s->location));
166 166
 
167 167
     return http_open_cnx(h);
168 168
 }
... ...
@@ -24,6 +24,8 @@
24 24
 #include <stdint.h>
25 25
 #include "avformat.h"
26 26
 
27
+#define MAX_URL_SIZE 4096
28
+
27 29
 typedef struct AVCodecTag {
28 30
     enum CodecID id;
29 31
     unsigned int tag;