Commit 244ef260 authored by David Reid's avatar David Reid

Fix a bug where decoding would try to read 0 frames and throw an error.

parent 3ea17061
......@@ -56556,6 +56556,7 @@ static ma_result ma_resource_manager_data_buffer_node_decode_next_page(ma_resour
framesToTryReading = framesRemaining;
}
if (framesToTryReading > 0) {
pDst = ma_offset_ptr(
pDataBufferNode->data.decoded.pData,
pDataBufferNode->data.decoded.decodedFrameCount * ma_get_bytes_per_frame(pDataBufferNode->data.decoded.format, pDataBufferNode->data.decoded.channels)
......@@ -56566,6 +56567,9 @@ static ma_result ma_resource_manager_data_buffer_node_decode_next_page(ma_resour
if (framesRead > 0) {
pDataBufferNode->data.decoded.decodedFrameCount += framesRead;
}
} else {
framesRead = 0;
}
} break;
case ma_resource_manager_data_supply_type_decoded_paged:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment