[XMA] Fix recursive lock acquisition in new decoder

This commit is contained in:
Herman S.
2026-02-09 18:04:34 +09:00
parent abaa0e4c96
commit ea056849fa
2 changed files with 6 additions and 1 deletions

View File

@@ -131,7 +131,7 @@ bool XmaContextNew::Work() {
if (data.IsConsumeOnlyContext()) {
Consume(&output_rb, &data);
if (data.output_buffer_read_offset == data.output_buffer_write_offset) {
Clear();
ClearLocked();
}
data.Store(context_ptr);
return true;
@@ -217,6 +217,10 @@ bool XmaContextNew::Block(bool poll) {
void XmaContextNew::Clear() {
std::lock_guard<xe_mutex> lock(lock_);
ClearLocked();
}
void XmaContextNew::ClearLocked() {
XELOGAPU("XmaContext: reset context {}", id());
auto context_ptr = memory()->TranslateVirtual(guest_ptr());

View File

@@ -61,6 +61,7 @@ class XmaContextNew : public XmaContext {
void Release();
private:
void ClearLocked();
static void SwapInputBuffer(XMA_CONTEXT_DATA* data);
// Convert sampling rate from ID to frequency.
static int GetSampleRate(int id);