audio_core: hle: mf: fix a memory accessing issue

This commit is contained in:
liushuyu 2019-02-09 13:40:09 -07:00
parent 6281660844
commit 01e0902fa4

View file

@ -98,6 +98,9 @@ std::optional<BinaryResponse> 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;