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

mp3 garbage detection fix #12464

Merged
merged 3 commits into from
Dec 25, 2023
Merged

mp3 garbage detection fix #12464

merged 3 commits into from
Dec 25, 2023

Conversation

daschuer
Copy link
Member

@acolombier has provided a file with some garbage at the beginning here #11923

Due to a missing sanity check, libmad fails to decode the file with an insane high bit rate. There is a similar check for Layer III but in this case Layer I was read from the garbage leads to bypassing the check.
I have added the check now in the Mixxx code and I can now play the file without any issues.

The same check for layer III can be found here:
https://github.com/markjeee/libmad/blob/c2f96fa4166446ac99449bdf6905f4218fb7d6b5/frame.c#L286

This prevents to abort decoding when files have some garbage similar to a valid header.
@JoergAtGithub
Copy link
Member

Could you extract this section of the mp3 file, to use it as test case for all sound sources, that support MP3?

@JoergAtGithub
Copy link
Member

Is main the right target for this bugfix?

@daschuer daschuer changed the base branch from main to 2.4 December 24, 2023 10:44
@JoergAtGithub
Copy link
Member

LGTM! Thank you!

@JoergAtGithub JoergAtGithub merged commit 869b95b into mixxxdj:2.4 Dec 25, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants