summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/mediaplayer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/avfoundation/mediaplayer')
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideoframerenderer_ios.mm20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer_ios.mm b/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer_ios.mm
index 0c8e8c52d..b5ad8538a 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer_ios.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer_ios.mm
@@ -240,14 +240,16 @@ void AVFVideoFrameRenderer::initRenderer()
//Need current context
m_glContext->makeCurrent(m_offscreenSurface);
- // Create a new open gl texture cache
- CVReturn err = CVOGLTextureCacheCreate(kCFAllocatorDefault, NULL,
- [EAGLContext currentContext],
- NULL, &m_textureCache);
-
- if (err) {
-#ifdef QT_DEBUG_AVF
- qWarning("Error at CVOGLTextureCacheCreate %d", err);
-#endif
+ if (!m_textureCache) {
+ // Create a new open gl texture cache
+ CVReturn err = CVOGLTextureCacheCreate(kCFAllocatorDefault, NULL,
+ [EAGLContext currentContext],
+ NULL, &m_textureCache);
+ if (err) {
+ #ifdef QT_DEBUG_AVF
+ qWarning("Error at CVOGLTextureCacheCreate %d", err);
+ #endif
+ }
}
+
}