Disable Format_RGB24 only in case of QOpenGLContext::LibGLES by
moving the no-opengl endif after the check against Format_RGB24.
Change-Id: I389ae2bb32dc8b2c55ec801f52d820620630b1c0
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
#ifndef QT_NO_OPENGL
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
-#endif
ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
+#endif
if (ok)
return QAbstractVideoSurface::NoError;
} else if (t == QAbstractVideoBuffer::QPixmapHandle) {