From cf5b2ccbb4f59f9605dbdca24bc3d91569851a17 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 18 Feb 2016 12:04:17 -0500 Subject: [PATCH] Flush the decoder before deleting it --- viddec.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/viddec.cpp b/viddec.cpp index 948e51a..e057ab3 100644 --- a/viddec.cpp +++ b/viddec.cpp @@ -149,6 +149,9 @@ void MoonlightInstance::DispatchGetPicture(uint32_t unused) { void MoonlightInstance::VidDecCleanup(void) { free(s_DecodeBuffer); + + // Flush and delete the decoder + g_Instance->m_VideoDecoder->Flush(pp::BlockUntilComplete()); delete g_Instance->m_VideoDecoder; if (g_Instance->m_Texture2DShader.program) {