Enforce a read callback to be specified for decoders.

This commit is contained in:
David Reid
2026-03-12 06:15:27 +10:00
parent 6922366bb1
commit 52d09d3688
+5
View File
@@ -66237,6 +66237,11 @@ static ma_result ma_decoder__preinit(ma_decoder_read_proc onRead, ma_decoder_see
MA_ZERO_OBJECT(pDecoder); MA_ZERO_OBJECT(pDecoder);
/* A read callback must be available. */
if (onRead == NULL) {
return MA_INVALID_ARGS;
}
dataSourceConfig = ma_data_source_config_init(); dataSourceConfig = ma_data_source_config_init();
dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable; dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable;