Flush the decoder before deleting it

This commit is contained in:
Cameron Gutman committed 2016-02-18 12:04:17 -05:00
1 parent 441047db9b
commit cf5b2ccbb4
1 file changed
+3
+3
View File
@@ -149,6 +149,9 @@ void MoonlightInstance::DispatchGetPicture(uint32_t unused) {
void MoonlightInstance::VidDecCleanup(void) { void MoonlightInstance::VidDecCleanup(void) {
free(s_DecodeBuffer); free(s_DecodeBuffer);
// Flush and delete the decoder
g_Instance->m_VideoDecoder->Flush(pp::BlockUntilComplete());
delete g_Instance->m_VideoDecoder; delete g_Instance->m_VideoDecoder;
if (g_Instance->m_Texture2DShader.program) { if (g_Instance->m_Texture2DShader.program) {