diff options
author | Andrey Utkin <andrey.krieger.utkin@gmail.com> | 2013-07-12 10:35:51 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-12 21:27:27 +0200 |
commit | 1e85b5e077e7e6fb9901bfd1a7a4f2594ba5a9a5 (patch) | |
tree | e76de9413e7c5ee32d1589973835e8f5745a2be1 /libavformat/network.c | |
parent | 9219ec93b145725ac74fbfbde7f67ac5135b85cf (diff) | |
download | ffmpeg-1e85b5e077e7e6fb9901bfd1a7a4f2594ba5a9a5.tar.gz |
ff_network_wait_fd_timeout(): check for interrupt before operation
Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/network.c')
-rw-r--r-- | libavformat/network.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/network.c b/libavformat/network.c index 55392af043..1cd83b80c5 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -157,11 +157,11 @@ int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterrupt int64_t wait_start = 0; while (1) { + if (ff_check_interrupt(int_cb)) + return AVERROR_EXIT; ret = ff_network_wait_fd(fd, write); if (ret != AVERROR(EAGAIN)) return ret; - if (ff_check_interrupt(int_cb)) - return AVERROR_EXIT; if (timeout > 0) { if (!wait_start) wait_start = av_gettime(); |