[FFmpeg-cvslog] r26014 - trunk/libavformat/tcp.c

mstorsjo subversion
Wed Dec 15 00:03:05 CET 2010


Author: mstorsjo
Date: Wed Dec 15 00:03:05 2010
New Revision: 26014

Log:
tcp: Check url_interrupt_cb if connect was interrupted by a signal

This makes it possible to abort a blocking connect call.

Patch by Thomas Guillem, thomas dot guillem at gmail

Modified:
   trunk/libavformat/tcp.c

Modified: trunk/libavformat/tcp.c
==============================================================================
--- trunk/libavformat/tcp.c	Tue Dec 14 23:45:35 2010	(r26013)
+++ trunk/libavformat/tcp.c	Wed Dec 15 00:03:05 2010	(r26014)
@@ -73,8 +73,11 @@ static int tcp_open(URLContext *h, const
  redo:
     ret = connect(fd, cur_ai->ai_addr, cur_ai->ai_addrlen);
     if (ret < 0) {
-        if (ff_neterrno() == FF_NETERROR(EINTR))
+        if (ff_neterrno() == FF_NETERROR(EINTR)) {
+            if (url_interrupt_cb())
+                goto fail1;
             goto redo;
+        }
         if (ff_neterrno() != FF_NETERROR(EINPROGRESS) &&
             ff_neterrno() != FF_NETERROR(EAGAIN))
             goto fail;



More information about the ffmpeg-cvslog mailing list