unix: Use rw_timeout for setting the connect timeout
authorMartin Storsjö <martin@martin.st>
Fri, 27 Feb 2015 23:47:20 +0000 (01:47 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 24 Mar 2016 08:34:29 +0000 (10:34 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/unix.c

index 6bb677d..647e7e8 100644 (file)
@@ -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);