diff options
author | Martin Storsjö <martin@martin.st> | 2015-02-28 01:47:20 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-03-24 10:34:29 +0200 |
commit | 3ee2ec5ec1e39a438f89302d949c93a1b5d365a2 (patch) | |
tree | 7cc7157d4ebed6084c9c94851b8cde659d1c2e81 | |
parent | 136c3438bbdb56a5d2f1f0f486f180641dc6dda0 (diff) | |
download | ffmpeg-3ee2ec5ec1e39a438f89302d949c93a1b5d365a2.tar.gz |
unix: Use rw_timeout for setting the connect timeout
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/unix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/unix.c b/libavformat/unix.c index 6bb677d997..647e7e86ae 100644 --- a/libavformat/unix.c +++ b/libavformat/unix.c @@ -73,6 +73,9 @@ static int unix_open(URLContext *h, const char *filename, int flags) if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0) return ff_neterrno(); + if (s->timeout < 0 && h->rw_timeout) + s->timeout = h->rw_timeout / 1000; + if (s->listen) { ret = ff_listen_bind(fd, (struct sockaddr *)&s->addr, sizeof(s->addr), s->timeout, h); |