forked from premiere/premiere-libtorrent
minor streaming improvements
This commit is contained in:
parent
aa85d3c35c
commit
e291ab3290
|
@ -995,8 +995,7 @@ namespace libtorrent
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// current download rate in bytes per seconds
|
// current download rate in bytes per seconds
|
||||||
rate = m_statistics.transfer_rate(stat::download_payload)
|
rate = m_statistics.transfer_rate(stat::download_payload);
|
||||||
+ m_statistics.transfer_rate(stat::download_protocol);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid division by zero
|
// avoid division by zero
|
||||||
|
|
|
@ -8793,6 +8793,11 @@ namespace libtorrent
|
||||||
, boost::bind(&peer_connection::download_queue_time, _1, 16*1024)
|
, boost::bind(&peer_connection::download_queue_time, _1, 16*1024)
|
||||||
< boost::bind(&peer_connection::download_queue_time, _2, 16*1024));
|
< boost::bind(&peer_connection::download_queue_time, _2, 16*1024));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if this peer's download time exceeds 2 seconds, we're done.
|
||||||
|
// We don't want to build unreasonably long request queues
|
||||||
|
if (!peers.empty() && peers[0]->download_queue_time() > milliseconds(2000))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// commit all the time critical requests
|
// commit all the time critical requests
|
||||||
|
|
Loading…
Reference in New Issue