danikula / danikula/AndroidVideoCache
Seek issue,use too much time.
- 主要言語
- Java
- スター
- 5.5k
- フォーク
- 1.2k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
```
private boolean isUseCache(GetRequest request) throws ProxyCacheException {
long sourceLength = source.length();
boolean sourceLengthKnown = sourceLength > 0;
long cacheAvailable = cache.available();
// do not use cache for partial requests which too far from available cache. It seems user seek video.
// return !sourceLengthKnown || !request.partial || request.rangeOffset <= cacheAvailable + sourceLength * NO_CACHE_BARRIER;
return !sourceLengthKnown || !request.partial || request.rangeOffset <= cacheAvailable;// + sourceLength * NO_CACHE_BARRIER;
}
```
HTTP MP4 file, if the duration too long, "sourceLength * NO_CACHE_BARRIER" well be a **BIG number**, fetch cache from network will coast too much time, seek blocked.
Remove the added number, seek works normally.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。