On 5/20/11 3:28 PM, Martin Storsjö wrote:
On Fri, 20 May 2011, Luca Barbato wrote:

On 5/20/11 3:05 PM, Martin Storsjö wrote:
On Fri, 20 May 2011, Luca Barbato wrote:

The connect() timeout can take minutes, gets misreported as EIO and
isn't interruptible.
---
   libavformat/tcp.c |   16 +++++++++++-----
   1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 0cb3ae3..cdab57c 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -45,6 +45,7 @@ static int tcp_open(URLContext *h, const char *uri, int
flags)
       char buf[256];
       int ret;
       socklen_t optlen;
+    int timeout = 20;
       char hostname[1024],proto[1024],path[1024];
       char portstr[10];


The unit of timeout needs to be specified somewhere. And isn't 20 x 100 ms
a bit low?

I'm not sure which could be a good default and which is not.

Something around 5-10 seconds (I'd prefer 10 over 5) would be sensible for
my applications at least.

updating now
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to