[XMA] Fix recursive lock acquisition in new decoder
This commit is contained in:
@@ -131,7 +131,7 @@ bool XmaContextNew::Work() {
|
|||||||
if (data.IsConsumeOnlyContext()) {
|
if (data.IsConsumeOnlyContext()) {
|
||||||
Consume(&output_rb, &data);
|
Consume(&output_rb, &data);
|
||||||
if (data.output_buffer_read_offset == data.output_buffer_write_offset) {
|
if (data.output_buffer_read_offset == data.output_buffer_write_offset) {
|
||||||
Clear();
|
ClearLocked();
|
||||||
}
|
}
|
||||||
data.Store(context_ptr);
|
data.Store(context_ptr);
|
||||||
return true;
|
return true;
|
||||||
@@ -217,6 +217,10 @@ bool XmaContextNew::Block(bool poll) {
|
|||||||
|
|
||||||
void XmaContextNew::Clear() {
|
void XmaContextNew::Clear() {
|
||||||
std::lock_guard<xe_mutex> lock(lock_);
|
std::lock_guard<xe_mutex> lock(lock_);
|
||||||
|
ClearLocked();
|
||||||
|
}
|
||||||
|
|
||||||
|
void XmaContextNew::ClearLocked() {
|
||||||
XELOGAPU("XmaContext: reset context {}", id());
|
XELOGAPU("XmaContext: reset context {}", id());
|
||||||
|
|
||||||
auto context_ptr = memory()->TranslateVirtual(guest_ptr());
|
auto context_ptr = memory()->TranslateVirtual(guest_ptr());
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class XmaContextNew : public XmaContext {
|
|||||||
void Release();
|
void Release();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void ClearLocked();
|
||||||
static void SwapInputBuffer(XMA_CONTEXT_DATA* data);
|
static void SwapInputBuffer(XMA_CONTEXT_DATA* data);
|
||||||
// Convert sampling rate from ID to frequency.
|
// Convert sampling rate from ID to frequency.
|
||||||
static int GetSampleRate(int id);
|
static int GetSampleRate(int id);
|
||||||
|
|||||||
Reference in New Issue
Block a user