diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2022-05-20 08:40:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 08:40:03 +0200 |
commit | 57b9857d0e3ae4550003d7565af7c06bbfa52404 (patch) | |
tree | cbf8da560902171206ba1e8225838241a49935bf | |
parent | 9cda64a5c16ff3639c882b70cc843bf4acfa734a (diff) | |
parent | 196c11defca96e0f7819a5f1d7c7a05e2dcda0fe (diff) |
Merge pull request #21422 from ksooo/android-fix-video-stutter
[Android] Fix video stutter after #21385
-rw-r--r-- | xbmc/windowing/android/WinSystemAndroidGLESContext.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp b/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp index a37e708f13..1f7868b39b 100644 --- a/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp +++ b/xbmc/windowing/android/WinSystemAndroidGLESContext.cpp @@ -132,12 +132,15 @@ void CWinSystemAndroidGLESContext::PresentRenderImpl(bool rendered) if (IsHdmiModeTriggered()) SetHdmiState(true); - // Ignore EGL_BAD_SURFACE: It seems to happen during/after mode changes, but - // we can't actually do anything about it - if (rendered && !m_pGLContext.TrySwapBuffers()) - CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed"); - - CXBMCApp::Get().WaitVSync(1000); + if (rendered) + { + // Ignore EGL_BAD_SURFACE: It seems to happen during/after mode changes, but + // we can't actually do anything about it + if (m_pGLContext.TrySwapBuffers()) + CXBMCApp::Get().WaitVSync(1000); + else + CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed"); + } } float CWinSystemAndroidGLESContext::GetFrameLatencyAdjustment() |