[FFmpeg-cvslog] unix: Use rw_timeout for setting the connect timeout

Martin Storsjö git at videolan.org
Thu Apr 21 17:02:06 CEST 2016


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sat Feb 28 01:47:20 2015 +0200| [3ee2ec5ec1e39a438f89302d949c93a1b5d365a2] | committer: Martin Storsjö

unix: Use rw_timeout for setting the connect timeout

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ee2ec5ec1e39a438f89302d949c93a1b5d365a2
---

 libavformat/unix.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/unix.c b/libavformat/unix.c
index 6bb677d..647e7e8 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);



More information about the ffmpeg-cvslog mailing list