summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-11-17 13:12:01 +0100
committerJan Ekström <jeebjp@gmail.com>2019-04-02 02:02:02 +0300
commit3f6be8335001faac76789691f5b63e3a869d9e53 (patch)
tree44466dfade5ba756fa112ec9cbf375f3cfd9d172 /video
parentb207c1d4a1cb4e92af4ff17d0145b1adee39fc6c (diff)
downloadmpv-3f6be8335001faac76789691f5b63e3a869d9e53.tar.bz2
mpv-3f6be8335001faac76789691f5b63e3a869d9e53.tar.xz
cocoa-cb: synchronise the flush with the render
this could lead to a crash on deinit when flush was called while the opengl state was cleaned up. Fixes #6323
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa-cb/video_layer.swift5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/cocoa-cb/video_layer.swift b/video/out/cocoa-cb/video_layer.swift
index ccc84f8fa8..69a9620409 100644
--- a/video/out/cocoa-cb/video_layer.swift
+++ b/video/out/cocoa-cb/video_layer.swift
@@ -110,8 +110,7 @@ class VideoLayer: CAOpenGLLayer {
}
updateSurfaceSize()
- mpv.drawRender(surfaceSize!)
- CGLFlushDrawable(ctx)
+ mpv.drawRender(surfaceSize!, ctx)
if needsICCUpdate {
needsICCUpdate = false
@@ -244,7 +243,7 @@ class VideoLayer: CAOpenGLLayer {
if isUpdate && needsFlip {
CGLSetCurrentContext(cglContext!)
if mpv.isRenderUpdateFrame() {
- mpv.drawRender(NSZeroSize, skip: true)
+ mpv.drawRender(NSZeroSize, cglContext!, skip: true)
}
}
displayLock.unlock()