[vlc-commits] vout iOS: fix playback in multi-opengl-context scenarios
Felix Paul Kühne
git at videolan.org
Sun Sep 24 11:55:32 CEST 2017
vlc | branch: master | Felix Paul Kühne <felix at serioese.gmbh> | Thu Sep 21 13:36:03 2017 +0200| [92e12667d3f8f1e35babba7dedd3f5e5525cafa7] | committer: Felix Paul Kühne
vout iOS: fix playback in multi-opengl-context scenarios
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92e12667d3f8f1e35babba7dedd3f5e5525cafa7
---
modules/video_output/ios.m | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 84abf91b7d..ba87c96069 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -558,6 +558,8 @@ static void OpenglESSwap(vlc_gl_t *gl)
return;
}
+ [self lock];
+
glDisable(GL_DEPTH_TEST);
glGenFramebuffers(1, &_frameBuffer);
@@ -573,6 +575,8 @@ static void OpenglESSwap(vlc_gl_t *gl)
if (_voutDisplay)
msg_Err(_voutDisplay, "Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
}
+
+ [self unlock];
}
- (void)destroyBuffers
@@ -585,9 +589,7 @@ static void OpenglESSwap(vlc_gl_t *gl)
return;
}
- /* re-set current context */
- EAGLContext *previousContext = [EAGLContext currentContext];
- [EAGLContext setCurrentContext:_eaglContext];
+ [self lock];
/* clear frame buffer */
glDeleteFramebuffers(1, &_frameBuffer);
@@ -596,7 +598,8 @@ static void OpenglESSwap(vlc_gl_t *gl)
/* clear render buffer */
glDeleteRenderbuffers(1, &_renderBuffer);
_renderBuffer = 0;
- [EAGLContext setCurrentContext:previousContext];
+
+ [self unlock];
}
- (void)resetBuffers
More information about the vlc-commits
mailing list