From: Martin Storsjö Date: Fri, 27 Feb 2015 23:47:20 +0000 (+0200) Subject: unix: Use rw_timeout for setting the connect timeout X-Git-Tag: android-x86-7.1-r1~252^2~1340 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3ee2ec5ec1e39a438f89302d949c93a1b5d365a2;p=android-x86%2Fexternal-ffmpeg.git unix: Use rw_timeout for setting the connect timeout Signed-off-by: Martin Storsjö --- 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);