[FFmpeg-cvslog] Revert "Timeout TCP open() after 5 seconds."

Michael Niedermayer git at videolan.org
Mon May 30 03:38:54 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 30 02:36:49 2011 +0200| [a22500744bf878e1c8f9dfd1c6695e861f544780] | committer: Michael Niedermayer

Revert "Timeout TCP open() after 5 seconds."

This code is redundant and conflicts with lucas reimplementation of it.

This reverts commit a2f5e14a867768019b49b830e29801f1bfb2abb7.

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

 libavformat/tcp.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index b144e31..963a993 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -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);



More information about the ffmpeg-cvslog mailing list