summaryrefslogtreecommitdiff
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-05 23:34:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-06 00:17:31 +0200
commit390aabb2a1ade0cefec6ab10e39b391b43de5c45 (patch)
treebc294089efd8b429dad6850c4cd20f16e25734ea /libavformat/tcp.c
parentef8cc06d6e50d3da7b781e126a3bce7929b53a55 (diff)
tcp: Fix the default timeout
Fixes Ticket2694 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 22fc8ce1ea..61b7d688a5 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -43,7 +43,7 @@ typedef struct TCPContext {
#define E AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{"listen", "listen on port instead of connecting", OFFSET(listen), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E },
-{"timeout", "timeout of socket i/o operations", OFFSET(rw_timeout), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, D|E },
+{"timeout", "timeout of socket i/o operations", OFFSET(rw_timeout), AV_OPT_TYPE_INT, {.i64 = 5000000}, 0, INT_MAX, D|E },
{"listen_timeout", "connection awaiting timeout", OFFSET(listen_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D|E },
{NULL}
};
@@ -66,7 +66,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
int ret;
char hostname[1024],proto[1024],path[1024];
char portstr[10];
- h->rw_timeout = 5000000;
av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
&port, path, sizeof(path), uri);