Commit 6114bffa authored by Michael Niedermayer's avatar Michael Niedermayer

retry_transfer_wrapper: only call interrupt callback when less than requested is r/w.

Its a waste of cpu cycles otherwise
parent 3e3ea93b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment