/* Decode the first frame to confirm that it is indeed a valid MP3 stream. */
/* Decode the first frame to confirm that it is indeed a valid MP3 stream. */
if(!drmp3_decode_next_frame(pMP3)){
if(!drmp3_decode_next_frame(pMP3)){
drmp3_uninit(pMP3);
drmp3__free_from_callbacks(pMP3->pData,&pMP3->allocationCallbacks);/* The call above may have allocated memory. Need to make sure it's freed before aborting. */
returnDRMP3_FALSE;/* Not a valid MP3 stream. */
returnDRMP3_FALSE;/* Not a valid MP3 stream. */
}
}
...
@@ -4458,6 +4458,9 @@ counts rather than sample counts.
...
@@ -4458,6 +4458,9 @@ counts rather than sample counts.
/*
/*
REVISION HISTORY
REVISION HISTORY
================
================
v0.6.23 - TBD
- Fix an error where a file can be closed twice when initialization of the decoder fails.
v0.6.22 - 2020-12-02
v0.6.22 - 2020-12-02
- Fix an error where it's possible for a file handle to be left open when initialization of the decoder fails.
- Fix an error where it's possible for a file handle to be left open when initialization of the decoder fails.