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

Issue with very short mp3 files #102

Closed
Skeevy opened this issue Oct 17, 2022 · 2 comments · May be fixed by #125
Closed

Issue with very short mp3 files #102

Skeevy opened this issue Oct 17, 2022 · 2 comments · May be fixed by #125

Comments

@Skeevy
Copy link

Skeevy commented Oct 17, 2022

Hello,

I'm using this in a debug environment. It's working nice and efficient for most files, but I have problems with very short files. I've attached a sample file. In fact, the decoder only returns one frame with 1152 samples here. Could you please have a look? Thanks!
Sample.zip

@Skeevy
Copy link
Author

Skeevy commented Nov 7, 2022

I just investigated this recently and it turned out that files with a frame size below MAX_FRAME_SYNC_MATCHES won't be decoded. I've lowered this constant and can't see any downside so far, so this is now working for me.

@Skeevy Skeevy closed this as completed Nov 7, 2022
misyltoad added a commit to misyltoad/minimp3 that referenced this issue Aug 9, 2024
If we match > 1 frame, and the next frame header is all NULL or a TAG then say that we matched a frame, as we likely reached the end of the file.

Fixes: lieff#102
@misyltoad
Copy link

My PR here #125 likely solves the problem for you. I hit this with playing short sfx in a game.

misyltoad added a commit to misyltoad/minimp3 that referenced this issue Aug 15, 2024
If we match > 1 frame, and the next frame header is all NULL or a TAG then say that we matched a frame, as we likely reached the end of the file.

Fixes: lieff#102
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 a pull request may close this issue.

2 participants