From 01e0902fa42d35e78faacd15dd68ee40aea66d56 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Sat, 9 Feb 2019 13:40:09 -0700 Subject: [PATCH] audio_core: hle: mf: fix a memory accessing issue --- src/audio_core/hle/wmf_decoder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio_core/hle/wmf_decoder.cpp b/src/audio_core/hle/wmf_decoder.cpp index 44a250c338..c3c8d6f15b 100644 --- a/src/audio_core/hle/wmf_decoder.cpp +++ b/src/audio_core/hle/wmf_decoder.cpp @@ -98,6 +98,9 @@ std::optional WMFDecoder::Impl::Initalize(const BinaryRequest& r void WMFDecoder::Impl::Clear() { if (initialized) { MFFlush(transform.get()); + // delete the transform object before shutting down MF + // otherwise access violation will occur + transform.reset(); MFDestroy(); } initialized = false;