mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
retry_transfer_wrapper: only call interrupt callback when less than requested is r/w.
Its a waste of cpu cycles otherwise
This commit is contained in:
parent
3e3ea93b3c
commit
6114bffa91
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user