[FFmpeg-devel] [PATCH] Fix connect return EWOULDBLOCK not EINPROGRESS under mingw

Jason Millard jsm174
Thu Jul 5 06:36:20 CEST 2007


> So now that we have a new maintainer, maybe you could have a look at the
> patch. I can't get it to work without it while, alex says it's fixed
> somewhere else.
>
> connect always returns EWOULDBLOCK and never EINPROGRESS, and since
> EWOULDBLOCK is not checked after connect, it will fail if connect doesn't
> manage complete directly.

I've been waiting/watching this for awhile now, and he did have a
patch that I think was agreed on (eagain.diff?):

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-May/029633.html

I kept checking SVN around that time, and I think all the other
patches got in except for that one.

-- Jason
-------------- next part --------------
Index: libavformat/tcp.c
===================================================================
--- libavformat/tcp.c	(revision 9045)
+++ libavformat/tcp.c	(working copy)
@@ -69,7 +71,8 @@
     if (ret < 0) {
         if (ff_neterrno() == FF_NETERROR(EINTR))
             goto redo;
-        if (ff_neterrno() != FF_NETERROR(EINPROGRESS))
+        if (ff_neterrno() != FF_NETERROR(EINPROGRESS) &&
+            ff_neterrno() != FF_NETERROR(EAGAIN))
             goto fail;
 
         /* wait until we are connected or until abort */



More information about the ffmpeg-devel mailing list