From 313fb3e5a35c4b42463698eb9b97ff9baf72418d Mon Sep 17 00:00:00 2001 From: Gliniak Date: Sat, 5 Jun 2021 15:36:31 +0200 Subject: [PATCH] [XMA] GetFrameNumber: Return correct frame_idx at stream end --- src/xenia/apu/xma_context.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/apu/xma_context.cc b/src/xenia/apu/xma_context.cc index 8babc67c2..9791cba85 100644 --- a/src/xenia/apu/xma_context.cc +++ b/src/xenia/apu/xma_context.cc @@ -719,7 +719,7 @@ std::tuple XmaContext::GetFrameNumber(uint8_t* block, size_t size, int frame_idx = 0; while (true) { if (stream.BitsRemaining() < 15) { - return {packet_idx, -1}; + break; } if (stream.offset_bits() == bit_offset) {