[APU] Resolved context stuck with is_stream_done_ flag and no space left

This commit is contained in:
Gliniak 2023-01-03 19:49:21 +01:00
parent b7bc0425ba
commit 39c509b57f
1 changed files with 7 additions and 7 deletions

View File

@ -368,6 +368,13 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
current_input_buffer, data->output_buffer_ptr,
data->output_buffer_block_count);
if (is_stream_done_) {
is_stream_done_ = false;
packets_skip_ = 0;
SwapInputBuffer(data);
return;
}
size_t input_buffer_0_size =
data->input_buffer_0_packet_count * kBytesPerPacket;
size_t input_buffer_1_size =
@ -414,13 +421,6 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
// Out of data.
break;
}
if (is_stream_done_) {
is_stream_done_ = false;
packets_skip_ = 0;
SwapInputBuffer(data);
return;
}
// Setup the input buffer if we are at loop_end.
// The input buffer must not be swapped out until all loops are processed.
reuse_input_buffer = TrySetupNextLoop(data, false);