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

drmp3_init_memory always returns NULL #33

Closed
ghost opened this issue Apr 27, 2018 · 1 comment
Closed

drmp3_init_memory always returns NULL #33

ghost opened this issue Apr 27, 2018 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Apr 27, 2018

Noticed a possible bug.

Whenever I try to use drmp3_init_memory, I always get the return value of the function as false.

I am using:

 drmp3 dr_mp3;
 bool res =drmp3_init_memory(&dr_mp3,(const unsigned char*)sound->types.mp3.data,sound->types.mp3.size,NULL);

It seems the pMP3->memory struct is zeroed out somewhere which means it seems to not read from the memory buffer at all on the read callback, which means it always fails decoding the first MPEG frame.

@mackron
Copy link
Owner

mackron commented Apr 28, 2018

Yep, you're right. I was stupid and didn't test it. A fix is in master (939ff66).

Thanks for your bug report!

@mackron mackron closed this as completed Apr 28, 2018
@mackron mackron added the bug label Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant