Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多段缓存时,Mp4CacheTask.getRequestRange() 返回的分段问题 #19

Open
IHaveALittleMouse opened this issue Jun 14, 2022 · 0 comments

Comments

@IHaveALittleMouse
Copy link

当有多段缓存时,Mp4CacheTask.getRequestRange() 返回的分段会忽略一部分已经缓存的分段。
以下图为例,当一个视频具有三段缓存时,如果 position 在 cache1 和 cache2 之间,则最终返回的分段的起点为 position,终点为 cache3 的起点,cache2 会被忽略,被再缓存一次。

ProblemOfGetRequestRange

以我目前的理解,正确的返回值应该是 VideoRange(finalStart, firstEnd),即起点为 position,终点为 cache2 的起点。缓存完这一段后,Mp4VideoCacheThread.notifyOnCacheRangeCompleted()会被调用去缓存下一段,补上所有的“洞”。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant