]> git.sesse.net Git - ffmpeg/commitdiff
Revert "Timeout TCP open() after 5 seconds."
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 30 May 2011 00:36:49 +0000 (02:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 30 May 2011 00:36:49 +0000 (02:36 +0200)
This code is redundant and conflicts with lucas reimplementation of it.

This reverts commit a2f5e14a867768019b49b830e29801f1bfb2abb7.

libavformat/tcp.c

index b144e3145722b7700cf0d948f4906c4912acb058..963a9934953ec718a6c3a9fd32f54ece99fd5cca 100644 (file)
@@ -97,7 +97,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
     }
 
     if (ret < 0) {
-        int timeout=50;
         struct pollfd p = {fd, POLLOUT, 0};
         ret = ff_neterrno();
         if (ret == AVERROR(EINTR)) {
@@ -120,12 +119,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
             ret = poll(&p, 1, 100);
             if (ret > 0)
                 break;
-            if(!--timeout){
-                av_log(NULL, AV_LOG_ERROR,
-                    "TCP open %s:%d timeout\n",
-                    hostname, port);
-                goto fail;
-            }
         }
         if (ret <= 0) {
             ret = AVERROR(ETIMEDOUT);