Skip to content

Commit

Permalink
Fix VideoOutputOpenGLVAAPI for recent changes to OpenGL code
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Jan 16, 2019
1 parent cb31439 commit fba17a3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions mythtv/libs/libmythtv/videoout_openglvaapi.cpp
Expand Up @@ -3,10 +3,7 @@
#include "openglvideo.h"
#include "vaapicontext.h"
#include "mythpainter.h"
#ifdef USING_OPENGLES
#include "mythrender_opengl2es.h"
#include "mythmainwindow.h"
#endif
#include <QGuiApplication>

#define LOC QString("VidOutGLVAAPI: ")
Expand Down Expand Up @@ -340,17 +337,15 @@ bool VideoOutputOpenGLVAAPI::AllowVAAPIDisplay()
return false;
}

#ifdef USING_OPENGLES
MythMainWindow* win = MythMainWindow::getMainWindow();
if (win)
{
MythRender *render = win->GetRenderDevice();
if (static_cast<MythRenderOpenGL2ES*>(render))
MythRenderOpenGL *render = static_cast<MythRenderOpenGL*>(win->GetRenderDevice());
if (!render || (render && render->isOpenGLES()))
{
LOG(VB_GENERAL, LOG_INFO, "Disabling VAAPI display with OpenGLES");
LOG(VB_GENERAL, LOG_INFO, "Disabling VAAPI - incompatible with current render device");
return false;
}
}
#endif
return true;
}

0 comments on commit fba17a3

Please sign in to comment.