/*
* TCP protocol
- * Copyright (c) 2002 Fabrice Bellard.
+ * Copyright (c) 2002 Fabrice Bellard
*
* This file is part of FFmpeg.
*
#include <unistd.h>
#include "network.h"
#include "os_support.h"
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#include <sys/time.h>
typedef struct TCPContext {
int fd_max, ret;
struct timeval tv;
socklen_t optlen;
- char hostname[1024],proto[1024],path[1024],tmp[1024],*q;
+ char hostname[1024],proto[1024],path[1024];
if(!ff_network_init())
return AVERROR(EIO);
&port, path, sizeof(path), uri);
if (strcmp(proto,"tcp") || port <= 0 || port >= 65536)
return AVERROR(EINVAL);
- if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); }
dest_addr.sin_family = AF_INET;
dest_addr.sin_port = htons(port);