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:
@@ -304,6 +304,9 @@ void QAndroidTextureVideoOutput::renderFrameToFbo()
|
||||
{
|
||||
QMutexLocker locker(&m_mutex);
|
||||
|
||||
if (!m_nativeSize.isValid() || !m_surfaceTexture)
|
||||
return;
|
||||
|
||||
createGLResources();
|
||||
|
||||
m_surfaceTexture->updateTexImage();
|
||||
|
||||
Reference in New Issue
Block a user