[FFmpeg-cvslog] retry_transfer_wrapper(): check for interrupt before operation
Andrey Utkin
git at videolan.org
Fri Jul 12 21:28:48 CEST 2013
ffmpeg | branch: master | Andrey Utkin <andrey.krieger.utkin at gmail.com> | Thu Jul 11 00:19:05 2013 +0300| [34fd21120d8672357293cb83d8c9b770850db516] | committer: Michael Niedermayer
retry_transfer_wrapper(): check for interrupt before operation
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=34fd21120d8672357293cb83d8c9b770850db516
---
libavformat/avio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 5916e46..2c7a35e 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -273,6 +273,8 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
len = 0;
while (len < size_min) {
+ if (ff_check_interrupt(&h->interrupt_callback))
+ return AVERROR_EXIT;
ret = transfer_func(h, buf+len, size-len);
if (ret == AVERROR(EINTR))
continue;
@@ -296,8 +298,6 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
if (ret)
fast_retries = FFMAX(fast_retries, 2);
len += ret;
- if (len < size && ff_check_interrupt(&h->interrupt_callback))
- return AVERROR_EXIT;
}
return len;
}
More information about the ffmpeg-cvslog
mailing list