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

Fail MP3 probe if AC3 or EC3 detected #5695

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jul 24, 2023

This PR will...

Check for AC3 and EC3 before passing MP3 probe.

Why is this Pull Request needed?

Unwrapped EC3 in #4958 sample media was passing the MP3 probe test. It doesn't take much to find MP3 sync bytes in a file after all other probed types fail.

This change moves the bsid check into a dolby module and runs in before passing the MP3 probe test regardless of the __USE_M2TS_ADVANCED_CODECS__ build constant so that HLS.js does not get false positives for MP3 demuxing when scanning ac3 and ec3 files. This allows HLS.js to go down the correct path (`"[transmuxer] Failed to find demuxer by probing fragment data") for unwrapped/unsupported EC3 files, and the same for AC3 files in the light build where the build constant strips support.

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

BSID for EC3 is 16, for AC3 < 16. While HLS.js does not support unwrapped EC3 or EC3 in TS, if it did the dolby module would serve as a place for shared code between the AC3 and EC3 demuxer modules.

Resolves issues:

Related to #4958

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

@robwalch robwalch requested a review from mtoczko July 24, 2023 23:46
@robwalch robwalch added this to the 1.5.0 milestone Jul 26, 2023
@robwalch robwalch merged commit b724bd3 into master Jul 26, 2023
17 checks passed
@robwalch robwalch deleted the bugfix/ec3-ac3-probe-before-mp3 branch July 26, 2023 18:12
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.

1 participant