Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix failed assertion for eviction logic
In shaka-project#3169, we discovered failing assertions for some multi-Period DASH live streams. The failing assertion was meant to ensure that our eviction logic was correct, and that our assumptions are maintained properly. Though the assertion failed, nothing was actually wrong with playback. But the assertion itself should only fail if there is actually something wrong. With the choice between removing the assertion (since playback is fine) or "fixing" the assertion (to avoid this false negative), I chose to fix the assertion to retain the value of it to catch actual bugs in our logic in the future. The assertion specifies that you should not see evicted segments after non-evicted segments. But eviction was only done when merging a segment index with an old version of the same index (same Representation and Period). When an update drops a Period from the manifest, this means everything in that Period should be evicted. But the eviction call wouldn't happen, because we had no new version of the segment index to update the old one. An extra call to evict() on each manifest update can fix the state of the system so that our assertions pass. The assertion message appeared identically in two different assertions, so this change also rewrites the assertion messages to differentiate them and to clarify their meanings. Issue shaka-project#3169 Change-Id: Ifeb7a1a8f48af704b028a22d987349209d7ee485
- Loading branch information