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

Fix M2TS probing when PAT packet is not found in first three packets #5252

Merged
merged 1 commit into from Feb 23, 2023

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Feb 22, 2023

This PR will...

Fix MPEG2-TS probing when PAT packet is not found in the first three packets.

Why is this Pull Request needed?

Sometimes HLS assets with segmented M2TS streams have segments that do not begin with PAT and PMT packets. Despite this not being spec compliant it is widely supported. Recent changes to TS probing in v1.3 broke support for segments like this (#5251).

Are there any points in the code the reviewer needs to double check?

As long as we find a sync byte and every following 188 byte packet starts with the same sync byte, keep looking for the PAT packet before passing the probe test. TS segments without a PAT (and no MAP in the Playlist to provide it) are not usable. It's worth noting that HLS.js does not support M2TS MAP init segments or implicit init segments when byteranges are used, but this is only commonly found in I-FRAME Playlists which also remain unsupported.

Resolves issues:

Fixes regression in #5251

Checklist

  • changes have been done against master branch, and PR does not conflict

@robwalch robwalch added this to the 1.4.0 milestone Feb 22, 2023
@robwalch robwalch marked this pull request as ready for review February 22, 2023 22:34
@robwalch robwalch merged commit fc37c2a into master Feb 23, 2023
@robwalch robwalch deleted the bugfix/ts-bad-map-probe-regression branch February 23, 2023 20:48
robwalch added a commit that referenced this pull request Feb 28, 2023
@robwalch robwalch modified the milestones: 1.4.0, 1.3.4 Feb 28, 2023
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

Successfully merging this pull request may close these issues.

None yet

1 participant