diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 01:58:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 01:58:03 +0200 |
commit | 6114bffa91714c83a533ae7e5a597ee605d35c3d (patch) | |
tree | 09b825df1110bae6b4d258de11642c2d44eafdf9 | |
parent | 3e3ea93b3c5041ef983ae459db8b706b7b708ef1 (diff) | |
download | ffmpeg-6114bffa91714c83a533ae7e5a597ee605d35c3d.tar.gz |
retry_transfer_wrapper: only call interrupt callback when less than requested is r/w.
Its a waste of cpu cycles otherwise
-rw-r--r-- | libavformat/avio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 5dca68a50c..491ebc1780 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -237,7 +237,7 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int if (ret) fast_retries = FFMAX(fast_retries, 2); len += ret; - if (url_interrupt_cb()) + if (len < size && url_interrupt_cb()) return AVERROR_EXIT; } return len; |