comparison tcp.c @ 3752:4ef51601582d libavformat

Remove useless comments. See "[PATCH] tcp.c/udp.c memleak?" for discussion.
author rbultje
date Sat, 23 Aug 2008 17:39:10 +0000
parents 69b7efa1e0cb
children 42ed3629601d
comparison
equal deleted inserted replaced
3751:772eba9f4b30 3752:4ef51601582d
37 TCPContext *s = NULL; 37 TCPContext *s = NULL;
38 fd_set wfds; 38 fd_set wfds;
39 int fd_max, ret; 39 int fd_max, ret;
40 struct timeval tv; 40 struct timeval tv;
41 socklen_t optlen; 41 socklen_t optlen;
42 char proto[1024],path[1024],tmp[1024]; // PETR: protocol and path strings 42 char proto[1024],path[1024],tmp[1024];
43 43
44 url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), 44 url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
45 &port, path, sizeof(path), uri); // PETR: use url_split 45 &port, path, sizeof(path), uri);
46 if (strcmp(proto,"tcp")) goto fail; // PETR: check protocol 46 if (strcmp(proto,"tcp")) goto fail;
47 if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); } // PETR: take only the part after '@' for tcp protocol 47 if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); }
48 48
49 s = av_malloc(sizeof(TCPContext)); 49 s = av_malloc(sizeof(TCPContext));
50 if (!s) 50 if (!s)
51 return AVERROR(ENOMEM); 51 return AVERROR(ENOMEM);
52 h->priv_data = s; 52 h->priv_data = s;