comparison http.c @ 2193:5ce5fad0dfac libavformat

replace the uses of old string functions that Reimar missed
author mru
date Sun, 24 Jun 2007 11:27:12 +0000
parents da71207a7cf1
children b21c2af60bc9
comparison
equal deleted inserted replaced
2192:c97fab0f9803 2193:5ce5fad0dfac
61 HTTPContext *s = h->priv_data; 61 HTTPContext *s = h->priv_data;
62 URLContext *hd = NULL; 62 URLContext *hd = NULL;
63 63
64 proxy_path = getenv("http_proxy"); 64 proxy_path = getenv("http_proxy");
65 use_proxy = (proxy_path != NULL) && !getenv("no_proxy") && 65 use_proxy = (proxy_path != NULL) && !getenv("no_proxy") &&
66 strstart(proxy_path, "http://", NULL); 66 av_strstart(proxy_path, "http://", NULL);
67 67
68 /* fill the dest addr */ 68 /* fill the dest addr */
69 redo: 69 redo:
70 /* needed in any case to build the host string */ 70 /* needed in any case to build the host string */
71 url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, 71 url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port,
124 return AVERROR(ENOMEM); 124 return AVERROR(ENOMEM);
125 } 125 }
126 h->priv_data = s; 126 h->priv_data = s;
127 s->filesize = -1; 127 s->filesize = -1;
128 s->off = 0; 128 s->off = 0;
129 pstrcpy (s->location, URL_SIZE, uri); 129 av_strlcpy(s->location, uri, URL_SIZE);
130 130
131 ret = http_open_cnx(h); 131 ret = http_open_cnx(h);
132 if (ret != 0) 132 if (ret != 0)
133 av_free (s); 133 av_free (s);
134 return ret; 134 return ret;