Merge commit '22f98ac19cf29f22b3e1d10314df9503f06fe683'
authorJames Almer <jamrial@gmail.com>
Tue, 11 Sep 2018 16:17:38 +0000 (13:17 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 11 Sep 2018 16:17:38 +0000 (13:17 -0300)
* commit '22f98ac19cf29f22b3e1d10314df9503f06fe683':
  network: Check for EINTR in ff_poll_interrupt

Merged-by: James Almer <jamrial@gmail.com>
1  2 
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);