diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 678fd63d84..a0f09eadc4 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -24,6 +24,7 @@ #endif #include +#include #include "gstgl_cocoa_private.h" @@ -280,11 +281,12 @@ gst_gl_window_cocoa_draw (GstGLWindow * window) GstGLNSView *view = (GstGLNSView *)[window_cocoa->priv->internal_win_id contentView]; /* this redraws the GstGLCAOpenGLLayer which calls - * gst_gl_window_cocoa_draw_thread() + * gst_gl_window_cocoa_draw_thread(). Use an explicit CATransaction since we + * don't know how often the main runloop is running. */ - dispatch_sync (dispatch_get_main_queue(), ^{ - [view setNeedsDisplay:YES]; - }); + [CATransaction begin]; + [view setNeedsDisplay:YES]; + [CATransaction commit]; } static void