]> git.sesse.net Git - ffmpeg/commitdiff
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

index 4bae7e2e446367a5009f7ba5c98aae8233a7e624,24fcf20539c265c28908e4b51fb6f357ae073295..c97e59d62049b001eb36a09e2c129adb242374f6
@@@ -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);