Skip to content
Snippets Groups Projects
Commit 390aabb2 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

tcp: Fix the default timeout


Fixes Ticket2694

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent ef8cc06d
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ typedef struct TCPContext { ...@@ -43,7 +43,7 @@ typedef struct TCPContext {
#define E AV_OPT_FLAG_ENCODING_PARAM #define E AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = { static const AVOption options[] = {
{"listen", "listen on port instead of connecting", OFFSET(listen), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E }, {"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 }, {"listen_timeout", "connection awaiting timeout", OFFSET(listen_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D|E },
{NULL} {NULL}
}; };
...@@ -66,7 +66,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags) ...@@ -66,7 +66,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
int ret; int ret;
char hostname[1024],proto[1024],path[1024]; char hostname[1024],proto[1024],path[1024];
char portstr[10]; char portstr[10];
h->rw_timeout = 5000000;
av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
&port, path, sizeof(path), uri); &port, path, sizeof(path), uri);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment