Support URI resolution for PDT between ExtInf and URI#46
Closed
Baraujo25 wants to merge 2 commits into
Closed
Conversation
Collaborator
Author
|
This PR was closed since the change was more suitable to be added into the hlsparserj actively maintained by Blazemeter at https://github.com/Blazemeter/hlsparserj/ Link to the PR that fixes above problem for the plugin: Blazemeter/hlsparserj#3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 pull request improves the robustness of HLS playlist parsing by handling cases where the segment URI is missing due to the presence of tags (such as
#EXT-X-PROGRAM-DATE-TIME) between#EXTINFand the segment URI. It introduces a fallback mechanism to extract segment URIs directly from the playlist body when the parser fails, and adds comprehensive tests to verify correct behavior for various playlist structures.HLS Playlist Parsing Robustness:
Playlist.getMediaSegments()method to detect when segment URIs are missing (e.g., due to#EXT-X-PROGRAM-DATE-TIMEbetween#EXTINFand the URI) and to extract URIs directly from the playlist body as a fallback, ensuring segments are resolved correctly in non-standard playlist layouts.requiresSegmentUriFallbackandextractSegmentUrisFromBodyto support the new fallback logic for segment URI extraction.ExtInf, which is now used directly in the fallback logic.Testing Improvements:
PlaylistTestwith scenarios covering playlists where#EXT-X-PROGRAM-DATE-TIMEappears before or between#EXTINFand segment URIs, as well as standard playlists, to ensure correct segment URI resolution in all cases.HlsSamplerTestto include a test for downloading a segment when the playlist contains#EXT-X-PROGRAM-DATE-TIMEbetween#EXTINFand the URI, and introduced a helper for building expected sample results. [1] [2] [3]