Remove some redundant error checks.

This commit is contained in:
David Reid
2026-01-07 12:05:57 +10:00
parent 8c4535c6c5
commit d791c16d8d
-6
View File
@@ -66278,12 +66278,10 @@ static ma_result ma_decoder_init__internal(ma_decoder_read_proc onRead, ma_decod
We use trial and error to open a decoder. We prioritize custom decoders so that if they We use trial and error to open a decoder. We prioritize custom decoders so that if they
implement the same encoding format they take priority over the built-in decoders. implement the same encoding format they take priority over the built-in decoders.
*/ */
if (result != MA_SUCCESS) {
result = ma_decoder_init_custom__internal(pConfig, pDecoder); result = ma_decoder_init_custom__internal(pConfig, pDecoder);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
onSeek(pDecoder, 0, ma_seek_origin_start); onSeek(pDecoder, 0, ma_seek_origin_start);
} }
}
/* /*
If we get to this point and we still haven't found a decoder, and the caller has requested a If we get to this point and we still haven't found a decoder, and the caller has requested a
@@ -66846,12 +66844,10 @@ MA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const
We use trial and error to open a decoder. We prioritize custom decoders so that if they We use trial and error to open a decoder. We prioritize custom decoders so that if they
implement the same encoding format they take priority over the built-in decoders. implement the same encoding format they take priority over the built-in decoders.
*/ */
if (result != MA_SUCCESS) {
result = ma_decoder_init_custom__internal(&config, pDecoder); result = ma_decoder_init_custom__internal(&config, pDecoder);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);
} }
}
/* /*
If we get to this point and we still haven't found a decoder, and the caller has requested a If we get to this point and we still haven't found a decoder, and the caller has requested a
@@ -66979,12 +66975,10 @@ MA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, c
We use trial and error to open a decoder. We prioritize custom decoders so that if they We use trial and error to open a decoder. We prioritize custom decoders so that if they
implement the same encoding format they take priority over the built-in decoders. implement the same encoding format they take priority over the built-in decoders.
*/ */
if (result != MA_SUCCESS) {
result = ma_decoder_init_custom__internal(&config, pDecoder); result = ma_decoder_init_custom__internal(&config, pDecoder);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start); ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);
} }
}
/* /*
If we get to this point and we still haven't found a decoder, and the caller has requested a If we get to this point and we still haven't found a decoder, and the caller has requested a