Test case for fix for issue #7975 #9174
Closed
+199
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First steps for fixing issue #7975 a unit test case[s] that show the bug.
The first commit, b9d959c is a functional test, if the fix goes outside of
MaskingMediaSource
itself then we'll need this test caseThe next commit, ac044ae60e is a unit test case for
MaskingMediaSource
itself, if the code change to fix involves how the position override works in this class then this test case should be all we need.Looking at the logic in line 2575
The initial seek is resolved here, against the
PlaylistTimeline
this happens when the initialMedaiItem
[s] are set so we have no idea even the duration of the window for the live playlist.Also, I believe using this as the target live offset may be a mistake, the usual use case for setting a position in a live playlist with an initial seek is a SOCU (start-over-catchup) where live is buffered to a rolling buffer, in this case you want to treat it more like VOD (the rolling buffer playlist is typically labeled "EVENT" type until the program ends at which point an end tag is added.
So, there are these basic use cases for live:
The most strait forward fix I see is to make the initial
preparePositionUs
in theMaskingMediaPeriod
/MaskingMediaSource
have an unset value unless an initial seek or other explicit user action set it. This frees up 0 from serving as the default value as well as a possible user choice.@tonihei and @marcbaechinger you both have way more invested in this code and no doubt a bunch of refactoring plans I'm unaware of, so I don't want to add more test cases to code you may be refactoring away. As long as the first commit (the functional test) passes with 0 as the seek value the requirements are met and bug #7975 can likely be closed.