mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Fix a double-uninit error with decoders.
Public issue https://github.com/mackron/miniaudio/issues/1080
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
v0.11.24 - TBD
|
v0.11.24 - TBD
|
||||||
=====================
|
=====================
|
||||||
|
* Fix a possible double-uninit error when a decoder fails to initialize.
|
||||||
* Fix a compilation error with the MSVC Aarch64 build.
|
* Fix a compilation error with the MSVC Aarch64 build.
|
||||||
* Web: Fixed an error when uninitializing a context.
|
* Web: Fixed an error when uninitializing a context.
|
||||||
|
|
||||||
|
|||||||
-24
@@ -66523,14 +66523,6 @@ MA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, cons
|
|||||||
/* Initialization was successful. Finish up. */
|
/* Initialization was successful. Finish up. */
|
||||||
result = ma_decoder__postinit(&config, pDecoder);
|
result = ma_decoder__postinit(&config, pDecoder);
|
||||||
if (result != MA_SUCCESS) {
|
if (result != MA_SUCCESS) {
|
||||||
/*
|
|
||||||
The backend was initialized successfully, but for some reason post-initialization failed. This is most likely
|
|
||||||
due to an out of memory error. We're going to abort with an error here and not try to recover.
|
|
||||||
*/
|
|
||||||
if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {
|
|
||||||
pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, pDecoder->pBackend, &pDecoder->allocationCallbacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -67150,14 +67142,6 @@ MA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_co
|
|||||||
/* Initialization was successful. Finish up. */
|
/* Initialization was successful. Finish up. */
|
||||||
result = ma_decoder__postinit(&config, pDecoder);
|
result = ma_decoder__postinit(&config, pDecoder);
|
||||||
if (result != MA_SUCCESS) {
|
if (result != MA_SUCCESS) {
|
||||||
/*
|
|
||||||
The backend was initialized successfully, but for some reason post-initialization failed. This is most likely
|
|
||||||
due to an out of memory error. We're going to abort with an error here and not try to recover.
|
|
||||||
*/
|
|
||||||
if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {
|
|
||||||
pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, pDecoder->pBackend, &pDecoder->allocationCallbacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -67300,14 +67284,6 @@ MA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decod
|
|||||||
/* Initialization was successful. Finish up. */
|
/* Initialization was successful. Finish up. */
|
||||||
result = ma_decoder__postinit(&config, pDecoder);
|
result = ma_decoder__postinit(&config, pDecoder);
|
||||||
if (result != MA_SUCCESS) {
|
if (result != MA_SUCCESS) {
|
||||||
/*
|
|
||||||
The backend was initialized successfully, but for some reason post-initialization failed. This is most likely
|
|
||||||
due to an out of memory error. We're going to abort with an error here and not try to recover.
|
|
||||||
*/
|
|
||||||
if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {
|
|
||||||
pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, pDecoder->pBackend, &pDecoder->allocationCallbacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user