Android: detect more error cases when rendering frames to textures.

Don't render the frame if the SurfaceTexture has been released or
if the render size is invalid.

Change-Id: I6b8bf14e023ff54a560b0a9e6027ef9d7d06ab6a
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
Yoann Lopes
2016-04-01 15:15:59 +02:00
committed by Yoann Lopes
parent 80d8466a47
commit 3c3ea1ca20

View File

@@ -304,6 +304,9 @@ void QAndroidTextureVideoOutput::renderFrameToFbo()
{
QMutexLocker locker(&m_mutex);
if (!m_nativeSize.isValid() || !m_surfaceTexture)
return;
createGLResources();
m_surfaceTexture->updateTexImage();