Allow the odd empty segment to be skipped like a gap segment #5676
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.
This PR will...
Treat the odd empty segment FRAG_PARSING_ERROR as a gap. The stream controller will advance to the next segment without loop loading. If subsequent errors occur, a level switch will be attempted, up to
maxRetry
count.Why is this Pull Request needed?
Fixes regression of #4799 in v1.3 and v1.4 that introduced loop loading, and fatal errors after parsing errors accumulated beyond
maxRetry
count.Are there any points in the code the reviewer needs to double check?
Some care was taken not to regress frag parsing error handling and gap jumping:
For the sample streams provided in #5674 the empty segments are not needed and once the following segments are appended there are not gaps. The player does not recognize this to the case, and proceeds naively. In most cases we would want to switch variants when an error like this occurs to find an alternative, but in this case all variants are empty at the same playlist position. For that reason, this fix works well for that case, by avoiding switching. The problem is this may not work as well in cases where a better alternative would be found by switching down. In those cases, the down switch would not be made unless two consecutive errors occur.
Resolves issues:
Resolves #5674
Checklist