Fix st-audiofile bug which may prevent opening MP3

This commit is contained in:
Jean Pierre Cimalando 2020-10-31 12:09:40 +01:00
parent 9aded8ce4f
commit 1df11d072b

View file

@ -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);