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 MPEG-2 TS packet scanning regression #5006

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Nov 2, 2022

This PR will...

Restore TS demuxer code that scans for Transport Stream packets.

Why is this Pull Request needed?

Users reporting issues with streaming containing TS segments that do not start with mp2t packet sync byte. These bytes should be skipped.

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

Resolves issues:

Fixes #4922 #5002
Address comment #5001 (comment)

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

philcluff
philcluff previously approved these changes Nov 3, 2022
Copy link
Collaborator

@philcluff philcluff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the right change to make given the reports of this change causing issues, as much as I don't like supporting clearly malformed streams.

I think we should add a specific test stream for this honestly, if it's something that we're committing to supporting long term.

Would we be open to being more strict on this under a major version revision do you think?

@itsjamie
Copy link
Collaborator

itsjamie commented Nov 3, 2022

The general rule @philcluff that seems to be the guiding principle for "should we do this", is if it works in the <video> element natively on Safari.

A user shouldn't have content that functions playing it natively, go to a browser that uses MSE with hls.js, and have it fail.

I'm all for next major verison if it fails in Safari, we can fail.

@robwalch robwalch force-pushed the bugfix/mpeg2-ts-packet-scan-regression branch from 6774d6f to 6061521 Compare November 3, 2022 20:43
@robwalch robwalch merged commit c8896e6 into master Nov 3, 2022
@robwalch robwalch deleted the bugfix/mpeg2-ts-packet-scan-regression branch November 3, 2022 21:47
robwalch added a commit that referenced this pull request Nov 4, 2022
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.

Some m3u8 videos can‘t be played
3 participants