diff options
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r-- | libavformat/tcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index b01f0b85bf..83529dfcc4 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -73,8 +73,10 @@ static int tcp_open(URLContext *h, const char *uri, int flags) if (ret < 0) { struct pollfd p = {fd, POLLOUT, 0}; if (ff_neterrno() == AVERROR(EINTR)) { - if (url_interrupt_cb()) + if (url_interrupt_cb()) { + ret = AVERROR_EXIT; goto fail1; + } goto redo; } if (ff_neterrno() != AVERROR(EINPROGRESS) && @@ -84,7 +86,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) /* wait until we are connected or until abort */ for(;;) { if (url_interrupt_cb()) { - ret = AVERROR(EINTR); + ret = AVERROR_EXIT; goto fail1; } ret = poll(&p, 1, 100); |