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

Its a waste of cpu cycles otherwise
oldabi
Michael Niedermayer 14 years ago
parent 3e3ea93b3c
commit 6114bffa91
  1. 2
      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;

Loading…
Cancel
Save