Fix st-audiofile bug which may prevent opening MP3
This commit is contained in:
parent
9aded8ce4f
commit
1df11d072b
1 changed files with 1 additions and 5 deletions
6
external/st_audiofile/src/st_audiofile.c
vendored
6
external/st_audiofile/src/st_audiofile.c
vendored
|
|
@ -24,10 +24,6 @@ struct st_audio_file {
|
||||||
} cache;
|
} cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
st_audio_file_null = -1,
|
|
||||||
};
|
|
||||||
|
|
||||||
static st_audio_file* st_generic_open_file(const void* filename, int widepath)
|
static st_audio_file* st_generic_open_file(const void* filename, int widepath)
|
||||||
{
|
{
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
|
|
@ -95,7 +91,7 @@ static st_audio_file* st_generic_open_file(const void* filename, int widepath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try MP3
|
// Try MP3
|
||||||
if (af->type == st_audio_file_null) {
|
{
|
||||||
af->mp3 = (drmp3*)malloc(sizeof(drmp3));
|
af->mp3 = (drmp3*)malloc(sizeof(drmp3));
|
||||||
if (!af->mp3) {
|
if (!af->mp3) {
|
||||||
free(af);
|
free(af);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue