diff --git a/input.cpp b/input.cpp index 1d1e572..7f09625 100644 --- a/input.cpp +++ b/input.cpp @@ -58,7 +58,7 @@ void MoonlightInstance::DidLockMouse(int32_t result) { if (m_MouseLocked) { // Request an IDR frame to dump the frame queue that may have // built up from the GL pipeline being stalled. - g_Instance->m_RequestIdrFrame = true; + LiRequestIdrFrame(); } } diff --git a/moonlight-common-c b/moonlight-common-c index 5482584..9240090 160000 --- a/moonlight-common-c +++ b/moonlight-common-c @@ -1 +1 @@ -Subproject commit 54825845e70de935f3adede4fbd4e01aad1a15b5 +Subproject commit 9240090983d588bf7c40138c9a23ac1403c551f7 diff --git a/moonlight.hpp b/moonlight.hpp index c2c2ad4..452aad6 100644 --- a/moonlight.hpp +++ b/moonlight.hpp @@ -58,7 +58,6 @@ class MoonlightInstance : public pp::Instance, public pp::MouseLock { pp::MouseLock(this), m_HasNextPicture(false), m_IsPainting(false), - m_RequestIdrFrame(false), m_OpusDecoder(NULL), m_CallbackFactory(this), m_MouseLocked(false), @@ -190,7 +189,6 @@ class MoonlightInstance : public pp::Instance, public pp::MouseLock { bool m_HasNextPicture; PP_VideoPicture m_CurrentPicture; bool m_IsPainting; - bool m_RequestIdrFrame; pp::Rect m_PluginRect; diff --git a/viddec.cpp b/viddec.cpp index ae0c33a..7993b24 100644 --- a/viddec.cpp +++ b/viddec.cpp @@ -62,7 +62,7 @@ void MoonlightInstance::DidChangeFocus(bool got_focus) { // Request an IDR frame to dump the frame queue that may have // built up from the GL pipeline being stalled. if (got_focus) { - g_Instance->m_RequestIdrFrame = true; + LiRequestIdrFrame(); } } @@ -248,12 +248,6 @@ int MoonlightInstance::VidDecSubmitDecodeUnit(PDECODE_UNIT decodeUnit) { unsigned int offset; unsigned int totalLength; - // Request an IDR frame if needed - if (g_Instance->m_RequestIdrFrame) { - g_Instance->m_RequestIdrFrame = false; - return DR_NEED_IDR; - } - totalLength = decodeUnit->fullLength; if (decodeUnit->frameType == FRAME_TYPE_IDR) { // Add some extra space for the SPS fixup