From 20d823a42a9a345a020d2f5ba36b1ce09a56dea8 Mon Sep 17 00:00:00 2001
From: xperia64 <xperiancedapps@gmail.com>
Date: Wed, 10 Jun 2020 16:58:09 -0400
Subject: [PATCH] Fix WMF AAC decoder bug

---
 src/audio_core/hle/wmf_decoder.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/audio_core/hle/wmf_decoder.cpp b/src/audio_core/hle/wmf_decoder.cpp
index 02206ec01..27899282b 100644
--- a/src/audio_core/hle/wmf_decoder.cpp
+++ b/src/audio_core/hle/wmf_decoder.cpp
@@ -163,9 +163,10 @@ MFOutputState WMFDecoder::Impl::DecodingLoop(ADTSData adts_header,
             }
         }
 
-        // in case of "ok" only, just return quickly
+        // If we return OK here, the decoder won't be in a state to receive new data and will fail
+        // on the next call; instead treat it like the HaveMoreData case
         if (output_status == MFOutputState::OK)
-            return MFOutputState::OK;
+            continue;
 
         // for status = 2, reset MF
         if (output_status == MFOutputState::NeedReconfig) {