summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src/common
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2016-04-01 15:15:59 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-05-09 13:11:05 +0000
commit3c3ea1ca20f34fc7353fb4732c9e4ee822dd796a (patch)
treec127687b146bb5003fef2a6c31a3540b186d2891 /src/plugins/android/src/common
parent80d8466a470565d1d823b66e3b81dcc306d04f61 (diff)
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>
Diffstat (limited to 'src/plugins/android/src/common')
-rw-r--r--src/plugins/android/src/common/qandroidvideooutput.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/android/src/common/qandroidvideooutput.cpp b/src/plugins/android/src/common/qandroidvideooutput.cpp
index 87a725a93..3a22c4e98 100644
--- a/src/plugins/android/src/common/qandroidvideooutput.cpp
+++ b/src/plugins/android/src/common/qandroidvideooutput.cpp
@@ -304,6 +304,9 @@ void QAndroidTextureVideoOutput::renderFrameToFbo()
{
QMutexLocker locker(&m_mutex);
+ if (!m_nativeSize.isValid() || !m_surfaceTexture)
+ return;
+
createGLResources();
m_surfaceTexture->updateTexImage();