[FFmpeg-devel] [PATCH 3/5] ff_network_wait_fd_timeout(): check for interrupt before operation
Andrey Utkin
andrey.krieger.utkin at gmail.com
Wed Jul 10 23:19:06 CEST 2013
---
libavformat/network.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/network.c b/libavformat/network.c
index 55392af..1cd83b8 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();
--
1.8.1.5
More information about the ffmpeg-devel
mailing list