Fail MP3 probe if AC3 or EC3 detected #5695
Merged
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...
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