mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-30 19:34:43 +00: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)
|
if (ret)
|
||||||
fast_retries = FFMAX(fast_retries, 2);
|
fast_retries = FFMAX(fast_retries, 2);
|
||||||
len += ret;
|
len += ret;
|
||||||
if (url_interrupt_cb())
|
if (len < size && url_interrupt_cb())
|
||||||
return AVERROR_EXIT;
|
return AVERROR_EXIT;
|
||||||
}
|
}
|
||||||
return len;
|
return len;
|
||||||
|
Loading…
Reference in New Issue
Block a user