[FFmpeg-cvslog] Merge commit '22f98ac19cf29f22b3e1d10314df9503f06fe683'

James Almer git at videolan.org
Tue Sep 11 19:33:56 EEST 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Sep 11 13:17:38 2018 -0300| [03210fe138f3b3bd7f5272fe29aca810cf517329] | committer: James Almer

Merge commit '22f98ac19cf29f22b3e1d10314df9503f06fe683'

* commit '22f98ac19cf29f22b3e1d10314df9503f06fe683':
  network: Check for EINTR in ff_poll_interrupt

Merged-by: James Almer <jamrial at gmail.com>

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

 libavformat/network.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavformat/network.c b/libavformat/network.c
index 4bae7e2e44..c97e59d620 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -165,14 +165,17 @@ static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout,
         if (ff_check_interrupt(cb))
             return AVERROR_EXIT;
         ret = poll(p, nfds, POLLING_TIME);
-        if (ret != 0)
+        if (ret != 0) {
+            if (ret < 0)
+                ret = ff_neterrno();
+            if (ret == AVERROR(EINTR))
+                continue;
             break;
+        }
     } while (timeout <= 0 || runs-- > 0);
 
     if (!ret)
         return AVERROR(ETIMEDOUT);
-    if (ret < 0)
-        return ff_neterrno();
     return ret;
 }
 


======================================================================

diff --cc libavformat/network.c
index 4bae7e2e44,24fcf20539..c97e59d620
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@@ -165,9 -131,14 +165,14 @@@ static int ff_poll_interrupt(struct pol
          if (ff_check_interrupt(cb))
              return AVERROR_EXIT;
          ret = poll(p, nfds, POLLING_TIME);
-         if (ret != 0)
+         if (ret != 0) {
+             if (ret < 0)
+                 ret = ff_neterrno();
+             if (ret == AVERROR(EINTR))
+                 continue;
              break;
+         }
 -    } while (timeout < 0 || runs-- > 0);
 +    } while (timeout <= 0 || runs-- > 0);
  
      if (!ret)
          return AVERROR(ETIMEDOUT);



More information about the ffmpeg-cvslog mailing list