mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[XMA] Clear host data on context clear + swap buffer if decoding fails
This commit is contained in:
parent
668244adb7
commit
d24d3295c6
|
|
@ -147,9 +147,15 @@ void XmaContext::Clear() {
|
||||||
data.input_buffer_1_valid = 0;
|
data.input_buffer_1_valid = 0;
|
||||||
data.output_buffer_valid = 0;
|
data.output_buffer_valid = 0;
|
||||||
|
|
||||||
|
data.input_buffer_read_offset = 0;
|
||||||
data.output_buffer_read_offset = 0;
|
data.output_buffer_read_offset = 0;
|
||||||
data.output_buffer_write_offset = 0;
|
data.output_buffer_write_offset = 0;
|
||||||
|
|
||||||
|
xma_frame_.fill(0);
|
||||||
|
split_frame_len_ = 0;
|
||||||
|
split_frame_len_partial_ = 0;
|
||||||
|
split_frame_padding_start_ = 0;
|
||||||
|
|
||||||
data.Store(context_ptr);
|
data.Store(context_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -658,6 +664,7 @@ void XmaContext::Decode(XMA_CONTEXT_DATA* data) {
|
||||||
XELOGE("XmaContext {}: Error - Decoding failed", id());
|
XELOGE("XmaContext {}: Error - Decoding failed", id());
|
||||||
data->parser_error_status = 4; // TODO(Gliniak): Find all parsing errors
|
data->parser_error_status = 4; // TODO(Gliniak): Find all parsing errors
|
||||||
// and create enumerator from them
|
// and create enumerator from them
|
||||||
|
SwapInputBuffer(data);
|
||||||
assert_always();
|
assert_always();
|
||||||
return; // TODO bail out
|
return; // TODO bail out
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue